Fix right prompt error redirection

This commit is contained in:
Thomas Lovén 2024-02-21 08:48:39 +01:00
parent 19857722b4
commit ee10125402

View File

@ -1,13 +1,13 @@
function fish_right_prompt function fish_right_prompt
set -l ref (git symbolic-ref HEAD ^/dev/null) set -l ref (git symbolic-ref HEAD 2>/dev/null)
if test -z $ref if test -z $ref
return return
end end
git diff --no-ext-diff --quiet --exit-code ^/dev/null git diff --no-ext-diff --quiet --exit-code 2>/dev/null
or set -l dirty 'yes' or set -l dirty 'yes'
git diff-index --cached --quiet HEAD -- ^/dev/null git diff-index --cached --quiet HEAD -- 2>/dev/null
or set -l staged 'yes' or set -l staged 'yes'
set_color normal set_color normal