aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zsh/appearance.zsh7
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)