]> err.no Git - dotfiles/commitdiff
Try to get red colours in the zsh prompt on old zshs too
authortfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Fri, 25 Sep 2009 10:47:17 +0000 (10:47 +0000)
committertfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Fri, 25 Sep 2009 10:47:17 +0000 (10:47 +0000)
git-svn-id: file:///svn/tfheen/trunk/dotfiles@1402 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf

zshrc

diff --git a/zshrc b/zshrc
index 2e5a3342be734434c28b60607f2893a04abfe855..26da8ac381afd5dc824ffdb46de92966a3353968 100644 (file)
--- a/zshrc
+++ b/zshrc
@@ -29,7 +29,14 @@ alias ssh='ssh-add -l > /dev/null 2>&1 || ssh-add ; \ssh'
 
 bindkey -e      # Emacs-style commandline editing
 
-PROMPT=': %(!.%F{red}.)%U%n@%m%u%(!.%f.)'${CHROOT}' ${vcs_info_msg_0_}%B%30<..<%~%b %(!.#.>) '
+if [ $ZSH_VERSION = 4.3.6 ]; then
+    # Lenny's zsh doesn't have %F
+    FG_RED=$(tput setf 4)
+    FG_BLACK=$(tput setf 0)
+    PROMPT=': %(!.'"$FG_RED"'.)%U%n@%m%u%(!.'"$FG_BLACK"'.)'${CHROOT}' ${vcs_info_msg_0_}%B%30<..<%~%b %(!.#.>) '
+else
+    PROMPT=': %(!.%F{red}.)%U%n@%m%u%(!.%f.)'${CHROOT}' ${vcs_info_msg_0_}%B%30<..<%~%b %(!.#.>) '
+fi
 
 case `uname -s` in
     "FreeBSD")