From e096e4041f76c70a621df2b02bb67bed88e6bcee Mon Sep 17 00:00:00 2001 From: Andrei Gorgan Date: Mon, 3 Dec 2012 12:03:43 +0200 Subject: [PATCH 1/2] Print last exit status in mortalscumbag prompt --- themes/mortalscumbag.zsh-theme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme index 7e25b149..ae3f1c9f 100644 --- a/themes/mortalscumbag.zsh-theme +++ b/themes/mortalscumbag.zsh-theme @@ -46,7 +46,8 @@ function ssh_connection() { fi } -PROMPT=$'\n$(ssh_connection)%{$fg_bold[green]%}%n@%m%{$reset_color%}$(my_git_prompt) : %~\n%# ' +local ret_status="%(?:%{$fg_bold[green]%}:%{$fg_bold[red]%})%?%{$reset_color%}" +PROMPT=$'\n$(ssh_connection)%{$fg_bold[cyan]%}%n@%m%{$reset_color%}$(my_git_prompt) : %~\n[${ret_status}] %# ' ZSH_THEME_PROMPT_RETURNCODE_PREFIX="%{$fg_bold[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX=" $fg[white]‹ %{$fg_bold[yellow]%}" From 8925cff334f9009a0f27d38922731bbcd82c42cb Mon Sep 17 00:00:00 2001 From: Andrei Gorgan Date: Mon, 3 Dec 2012 12:29:45 +0200 Subject: [PATCH 2/2] Fix prompt color: Change it back to green --- themes/mortalscumbag.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme index ae3f1c9f..5dbf2e4f 100644 --- a/themes/mortalscumbag.zsh-theme +++ b/themes/mortalscumbag.zsh-theme @@ -47,7 +47,7 @@ function ssh_connection() { } local ret_status="%(?:%{$fg_bold[green]%}:%{$fg_bold[red]%})%?%{$reset_color%}" -PROMPT=$'\n$(ssh_connection)%{$fg_bold[cyan]%}%n@%m%{$reset_color%}$(my_git_prompt) : %~\n[${ret_status}] %# ' +PROMPT=$'\n$(ssh_connection)%{$fg_bold[green]%}%n@%m%{$reset_color%}$(my_git_prompt) : %~\n[${ret_status}] %# ' ZSH_THEME_PROMPT_RETURNCODE_PREFIX="%{$fg_bold[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX=" $fg[white]‹ %{$fg_bold[yellow]%}"