aboutsummaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
authorMatt Singleton <matthew.j.singleton@gmail.com>2011-03-22 00:13:32 -0400
committerMatt Singleton <matthew.j.singleton@gmail.com>2011-03-22 00:13:32 -0400
commitb2200295a7eb17958f3ee5d8b9629a94bdd4b26f (patch)
treeaf187b4a086ca61a9711b247aa3740e1e13649b1 /zsh
parent6fbc31c178ae567ab5e8cb82e1f82c4bdc51a213 (diff)
use the nifty zsh inline conditional (since the old way spontaneously stopped working)
Diffstat (limited to 'zsh')
-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)