Permalink
Browse files

custom server hostname

  • Loading branch information...
1 parent 468ba33 commit b17a6f5d8054f66c6c865c02cfcd3a7a922507fd cong.guo committed Mar 23, 2013
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+ '

0 comments on commit b17a6f5

Please sign in to comment.