From: tfheen Date: Fri, 25 Sep 2009 10:47:17 +0000 (+0000) Subject: Try to get red colours in the zsh prompt on old zshs too X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1742c91fe9e1763f05eb16620e5b57ef66cc7bac;p=dotfiles Try to get red colours in the zsh prompt on old zshs too git-svn-id: file:///svn/tfheen/trunk/dotfiles@1402 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- diff --git a/zshrc b/zshrc index 2e5a334..26da8ac 100644 --- 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")