mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-23 16:12:28 +08:00
Merge pull request #376 from bucaran/clearance+status
clearance theme should display red prompt if $status != 0
This commit is contained in:
commit
580f3e1d9d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user