aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@gmail.com>2016-01-31 15:01:20 +0800
committerAaron LI <aaronly.me@gmail.com>2016-01-31 15:01:20 +0800
commit3f6fa590a799ca955ae6afef59270048668490cf (patch)
tree1091201c1c28286bfb5a6cb59a192b210b0634e0
parent57257edd192eaebb285d781bac1969f0cb667ddb (diff)
downloaddotfiles-3f6fa590a799ca955ae6afef59270048668490cf.tar.bz2
zsh prompt: show exit code if error
-rw-r--r--_zsh/prompt.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/_zsh/prompt.zsh b/_zsh/prompt.zsh
index f1f581a..6c1911a 100644
--- a/_zsh/prompt.zsh
+++ b/_zsh/prompt.zsh
@@ -27,8 +27,8 @@ function git_prompt_info {
fi
}
-PROMPT='%{$fg_bold[blue]%}%~%<< $(git_prompt_info)${PR_BOLD_WHITE}>%{${reset_color}%} '
+PROMPT='%{$fg_bold[blue]%}%~%<< $(git_prompt_info)%{$fg_bold[red]%}%(?..[%?])${PR_BOLD_WHITE}>%{$reset_color%} '
-SPROMPT="zsh: correct $fg[red]%R$reset_color to $fg[green]%r$reset_color [(y)es (n)o (a)bort (e)dit]? "
+SPROMPT="zsh: correct %{$fg_bold[red]%}%R%{$reset_color%} to %{$fg_bold[green]%}%r%{$reset_color%} [(y)es (n)o (a)bort (e)dit]? "
# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #