diff options
author | Florian Pritz <f-p@gmx.at> | 2009-03-26 19:40:50 +0100 |
---|---|---|
committer | Florian Pritz <f-p@gmx.at> | 2009-03-26 19:40:50 +0100 |
commit | eb685697e673fed3f7ec8e8e94f67c27552f881b (patch) | |
tree | 21fb7c2d93017bda3fc951dff568e4088de8f90f /.zsh | |
parent | 29134773fe1c93345c9565250327b0a0c414cdf9 (diff) | |
download | dotfiles-eb685697e673fed3f7ec8e8e94f67c27552f881b.tar.gz dotfiles-eb685697e673fed3f7ec8e8e94f67c27552f881b.tar.xz |
display exitcode in prompt
Diffstat (limited to '.zsh')
-rw-r--r-- | .zsh/rc/15prompt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/.zsh/rc/15prompt b/.zsh/rc/15prompt index 5eb75ec..e4e062f 100644 --- a/.zsh/rc/15prompt +++ b/.zsh/rc/15prompt @@ -19,8 +19,7 @@ prompt_eof_setup() { prompt_eof_setup "$@" - - +EXITCODE="%(?..(%?%1) )" # function to show the current git branch in prompt parse_git_branch() { @@ -35,9 +34,9 @@ parse_git_branch() { precmd () { # this has to be on the edge or you have some spaces in the prompt # if you have any workaround please tell -PS1="${fg_light_red}$USERNAME${fg_no_colour}@${fg_light_green}%m${fg_no_colour} \ +PROMPT="${fg_light_red}$USERNAME${fg_no_colour}@${fg_light_green}%m${fg_no_colour} \ - ${fg_light_blue}%~${fg_no_colour} ${fg_purple}$(parse_git_branch)${fg_no_colour} -[${fg_cyan}%*${fg_no_colour}] > " +[${fg_cyan}%*${fg_no_colour}] ${fg_red}$EXITCODE${fg_no_colour}> " } ## Spelling prompt |