From 3f6fa590a799ca955ae6afef59270048668490cf Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 31 Jan 2016 15:01:20 +0800 Subject: zsh prompt: show exit code if error --- _zsh/prompt.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '_zsh/prompt.zsh') 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: # -- cgit v1.2.2