mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-23 10:20:55 +08:00
cleareance theme should display red prompt if status != 0
This commit is contained in:
parent
c187067981
commit
885b350912
@ -14,6 +14,8 @@ function _git_is_dirty
|
|||||||
end
|
end
|
||||||
|
|
||||||
function fish_prompt
|
function fish_prompt
|
||||||
|
set -l last_status $status
|
||||||
|
|
||||||
set -l cyan (set_color cyan)
|
set -l cyan (set_color cyan)
|
||||||
set -l yellow (set_color yellow)
|
set -l yellow (set_color yellow)
|
||||||
set -l red (set_color red)
|
set -l red (set_color red)
|
||||||
@ -48,7 +50,12 @@ function fish_prompt
|
|||||||
echo -n -s ' · ' $git_info $normal
|
echo -n -s ' · ' $git_info $normal
|
||||||
end
|
end
|
||||||
|
|
||||||
|
set -l prompt_color $red
|
||||||
|
if test $last_status = 0
|
||||||
|
set prompt_color $normal
|
||||||
|
end
|
||||||
|
|
||||||
# Terminate with a nice prompt char
|
# Terminate with a nice prompt char
|
||||||
echo -e ''
|
echo -e ''
|
||||||
echo -e -n -s '⟩ ' $normal
|
echo -e -n -s $prompt_color '⟩ ' $normal
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user