make git prompt blue when clean repo with untracked files

This commit is contained in:
lowne 2021-07-31 17:50:19 +02:00
parent 0d4f801150
commit 887419589a
2 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,9 @@ function fish_prompt
else if git_is_touched else if git_is_touched
set git_color white red set git_color white red
else if git_has_untracked
set git_color white blue
end end
if git_is_detached_head if git_is_detached_head

View File

@ -0,0 +1,3 @@
function git_has_untracked -d "Test if there are any untracked files in the working tree"
test "0" != (git_untracked_files)
end