From: tfheen Date: Tue, 5 Apr 2011 05:58:53 +0000 (+0000) Subject: Fix up prompt on localhost X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dfeb78dce1df48e53cad751039438b0295f2c92;p=dotfiles Fix up prompt on localhost git-svn-id: file:///svn/tfheen/trunk/dotfiles@1461 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- diff --git a/zshrc b/zshrc index 7deaa06..55c8e83 100644 --- 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