diff --git a/themes/apple.zsh-theme b/themes/apple.zsh-theme index 0c183258e..abff2ce41 100644 --- a/themes/apple.zsh-theme +++ b/themes/apple.zsh-theme @@ -1,5 +1,10 @@ function toon { - echo -n "" + r=$? + if [ $r -eq 0 ]; then + echo -n "%{$fg[magenta]%}" + else + echo -n "[$r]" + fi } autoload -Uz vcs_info @@ -18,7 +23,7 @@ theme_precmd () { } setopt prompt_subst -PROMPT='%{$fg[magenta]%}$(toon)%{$reset_color%} %~/ %{$reset_color%}${vcs_info_msg_0_}%{$reset_color%}' +PROMPT='$(toon)%{$reset_color%} %~/ %{$reset_color%}${vcs_info_msg_0_}%{$reset_color%}' autoload -U add-zsh-hook add-zsh-hook precmd theme_precmd