From 7dfeb78dce1df48e53cad751039438b0295f2c92 Mon Sep 17 00:00:00 2001 From: tfheen Date: Tue, 5 Apr 2011 05:58:53 +0000 Subject: [PATCH] Fix up prompt on localhost git-svn-id: file:///svn/tfheen/trunk/dotfiles@1461 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- zshrc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 -- 2.39.5