Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

custom server hostname

  • Loading branch information...
commit b17a6f5d8054f66c6c865c02cfcd3a7a922507fd 1 parent 468ba33
cong.guo authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 bashrc
View
5 bashrc
@@ -22,7 +22,10 @@ DARK_BLUE="\[\033[1;34m\]"
RED="\[\033[0;31m\]"
DARK_RED="\[\033[1;31m\]"
NO_COLOR="\[\033[0m\]"
-export PS1="$BLUE\H:$RED\W>$NO_COLOR "
+if [[ "$HOSTNAME" == "" ]]; then
+ HOSTNAME=`hostname`
+fi
+export PS1="$BLUE$HOSTNAME:$RED\W>$NO_COLOR "
export PS2='continue-> '
export PS4='$0.$LINENO+ '
Please sign in to comment.
Something went wrong with that request. Please try again.