diff options
author | Matt Singleton <matthew.j.singleton@gmail.com> | 2011-03-22 00:13:32 -0400 |
---|---|---|
committer | Matt Singleton <matthew.j.singleton@gmail.com> | 2011-03-22 00:13:32 -0400 |
commit | b2200295a7eb17958f3ee5d8b9629a94bdd4b26f (patch) | |
tree | af187b4a086ca61a9711b247aa3740e1e13649b1 | |
parent | 6fbc31c178ae567ab5e8cb82e1f82c4bdc51a213 (diff) |
use the nifty zsh inline conditional (since the old way spontaneously stopped working)
-rw-r--r-- | zsh/appearance.zsh | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/zsh/appearance.zsh b/zsh/appearance.zsh index edfbd82..b4cd049 100644 --- a/zsh/appearance.zsh +++ b/zsh/appearance.zsh @@ -32,12 +32,7 @@ function theme_preexec () { # print the exit code of the previous command in red if non-zero function return_code { - code=$(echo $?) - if [[ $code == "0" ]]; then - return - else - echo "%{$fg[red]%}$code%{$reset_color%} " - fi + echo "%(?..$fg[red]%?$reset_color )" } # print the svn revision number (rREVISION) |