From 885b35091250c9ba9350b31636d0046dace37ba8 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Sat, 14 Feb 2015 12:12:15 +0900 Subject: [PATCH] cleareance theme should display red prompt if status != 0 --- themes/clearance/fish_prompt.fish | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/themes/clearance/fish_prompt.fish b/themes/clearance/fish_prompt.fish index fa5b0f6..d1e7748 100644 --- a/themes/clearance/fish_prompt.fish +++ b/themes/clearance/fish_prompt.fish @@ -14,6 +14,8 @@ function _git_is_dirty end function fish_prompt + set -l last_status $status + set -l cyan (set_color cyan) set -l yellow (set_color yellow) set -l red (set_color red) @@ -48,7 +50,12 @@ function fish_prompt echo -n -s ' · ' $git_info $normal end + set -l prompt_color $red + if test $last_status = 0 + set prompt_color $normal + end + # Terminate with a nice prompt char echo -e '' - echo -e -n -s '⟩ ' $normal + echo -e -n -s $prompt_color '⟩ ' $normal end