diff options
author | Peter Palfrader <peter@palfrader.org> | 2011-01-18 21:32:21 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2011-01-18 21:32:21 +0000 |
commit | 01a46fc90cc12e3505f32330daae196acbd128eb (patch) | |
tree | da3b5c16d819096c16a0664833df65b565f5e4ab /zshrc | |
parent | 4aea571502cb99c38910aada740c991c04a3aee5 (diff) |
zshrc with error code in prompt
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@470 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'zshrc')
-rw-r--r-- | zshrc | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -331,11 +331,13 @@ function init-prompt() { zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat "%b${PR_RED}:${YELLOW}%r" fi + local exitcodeprompt + exitcodeprompt='%0(?..${PR_RED}e%?${PR_NO_COLOUR}:)' if [ "`id -u`" = "0" -o ! -x /usr/bin/id ] ; then - export PROMPT='${debian_chroot:+[$debian_chroot] }${VCS_INFO_message_0_}%n@%m:%~# ' + export PROMPT="${exitcodeprompt}"'${debian_chroot:+[$debian_chroot] }${VCS_INFO_message_0_}%n@%m:%~# ' export TITLE="%n@%m: %~" else - export PROMPT='${debian_chroot:+[$debian_chroot] }${VCS_INFO_message_0_}%n@%m:%~$ ' + export PROMPT="${exitcodeprompt}"'${debian_chroot:+[$debian_chroot] }${VCS_INFO_message_0_}%n@%m:%~$ ' export TITLE="%n@%m: %~" fi } @@ -355,3 +357,4 @@ fi [ -f COMMANDMENTS ] && cat COMMANDMENTS [ -e $HOME/.zshrc-local ] && . $HOME/.zshrc-local [ -e $HOME/.pal ] && [ -e /usr/bin/pal ] && pal -r 5-10 +true |