From b2200295a7eb17958f3ee5d8b9629a94bdd4b26f Mon Sep 17 00:00:00 2001 From: Matt Singleton Date: Tue, 22 Mar 2011 00:13:32 -0400 Subject: use the nifty zsh inline conditional (since the old way spontaneously stopped working) --- zsh/appearance.zsh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'zsh') 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) -- cgit v1.2.3