diff --git a/prompt.zsh b/prompt.zsh index 4fcc143..b639686 100644 --- a/prompt.zsh +++ b/prompt.zsh @@ -56,6 +56,20 @@ function promptSetup () { CURRENT_USER=`whoami` PR_SIGN=$NOCOLOR PR_SIGN+="%F{160}%B" + + # prepend the hostname if we are outside + if [[ "$MYHOSTEXPRESSION" == "" ]]; then + # if not set, home is nowhere + MYHOSTEXPRESSION="^$" + fi + if [[ "`hostname`" =~ "$MYHOSTEXPRESSION" ]]; then + # we are on our home desktop + else + # we are outside on a server + PR_SIGN+="`hostname` " + fi + + # setup the main sign if [[ $CURRENT_USER == 'root' ]]; then PR_SIGN+="☠" elif [[ $CURRENT_USER == 'vagrant' ]]; then @@ -63,7 +77,7 @@ function promptSetup () { else PR_SIGN+="∴" fi - #PR_SIGN+=%(#."☠".'∴') + PR_SIGN+="%F{white}%b"