mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-12 05:15:24 +08:00
git_prompt: fix non-informative upstream
`test -n informative` will always succeed. We want to test the informative variable instead so that other modes can still work.
This commit is contained in:
parent
c62d9c37d2
commit
aa8b3cb6d6
@ -275,7 +275,7 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi
|
|||||||
case '*' # diverged from upstream
|
case '*' # diverged from upstream
|
||||||
echo "$___fish_git_prompt_char_upstream_prefix$___fish_git_prompt_char_upstream_diverged$ahead-$behind"
|
echo "$___fish_git_prompt_char_upstream_prefix$___fish_git_prompt_char_upstream_diverged$ahead-$behind"
|
||||||
end
|
end
|
||||||
else if test -n informative
|
else if test -n "$informative"
|
||||||
echo $count | read -l behind ahead
|
echo $count | read -l behind ahead
|
||||||
switch "$count"
|
switch "$count"
|
||||||
case '' # no upstream
|
case '' # no upstream
|
||||||
|
Loading…
x
Reference in New Issue
Block a user