]> err.no Git - dotfiles/commitdiff
Fix up prompt on localhost
authortfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Tue, 5 Apr 2011 05:58:53 +0000 (05:58 +0000)
committertfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Tue, 5 Apr 2011 05:58:53 +0000 (05:58 +0000)
git-svn-id: file:///svn/tfheen/trunk/dotfiles@1461 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf

zshrc

diff --git a/zshrc b/zshrc
index 7deaa06633e242c7282464da21fb67731db7d404..55c8e83e09fd7b1fc4cc9b90dec765a4b7fb843d 100644 (file)
--- a/zshrc
+++ b/zshrc
@@ -35,12 +35,10 @@ if [ $ZSH_VERSION = 4.3.6 ]; then
     FG_BLACK=$(tput setf 0)
     PROMPT=': %(!.%{'"$FG_RED"'%}.)%U%n@%m%u%(!.%{'"$FG_BLACK"'%}.)'${CHROOT}' ${vcs_info_msg_0_}%B%30<..<%~%b %(!.#.>) '
 else
-    if [ -n "$SSH_CONNECTION" ]; then
-       FG_HOST="$(printf "%.3d" "$(expr substr "$(echo "${SSH_CONNECTION%% *}" | md5sum)" 1 2)")"
-       BG_HOST="$(printf "%.3d" "$(( 256 - $FG_HOST ))")"
-    fi
+    FG_HOST="$(printf "%.3d" "$(expr substr "$(echo "${SSH_CONNECTION%% *}" | md5sum)" 1 2)")"
+    BG_HOST="$(printf "%.3d" "$(( 256 - $FG_HOST ))")"
 
-    PROMPT=': %(!.%F{red}.)%U%n%(!.%f.)@%{$FG[$FG_HOST]$BG[$BG_HOST]%}%m%u%f%k'${CHROOT}' ${vcs_info_msg_0_}%B%30<..<%~%b %(!.#.>) '
+    PROMPT=': %(!.%F{red}.)%U%n%(!.%f.)@%{'"$FG[$FG_HOST]$BG[$BG_HOST]"'%}%m%u%f%k'${CHROOT}' ${vcs_info_msg_0_}%B%30<..<%~%b %(!.#.>) '
 fi
 
 case `uname -s` in