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:
Brian Gernhardt 2013-07-27 10:35:46 -04:00
parent c62d9c37d2
commit aa8b3cb6d6

View file

@ -275,7 +275,7 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi
case '*' # diverged from upstream
echo "$___fish_git_prompt_char_upstream_prefix$___fish_git_prompt_char_upstream_diverged$ahead-$behind"
end
else if test -n informative
else if test -n "$informative"
echo $count | read -l behind ahead
switch "$count"
case '' # no upstream