mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 23:47:25 +00:00
Fix non-verbose, non-informative __fish_git_prompt
At some point the non-verbose, non-informative variant of the prompt (e.g. the variant that looks like the bash prompt) was modified to try and show the behind/ahead counts the same way the informative prompt does. Besides being wrong, it also didn't work because behind/ahead weren't defined.
This commit is contained in:
parent
6c987d6708
commit
fe3b439e31
1 changed files with 3 additions and 3 deletions
|
@ -336,11 +336,11 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi
|
|||
case "0 0" # equal to upstream
|
||||
echo "$___fish_git_prompt_char_upstream_prefix$___fish_git_prompt_char_upstream_equal"
|
||||
case "0 *" # ahead of upstream
|
||||
echo "$___fish_git_prompt_char_upstream_prefix$___fish_git_prompt_char_upstream_ahead$ahead"
|
||||
echo "$___fish_git_prompt_char_upstream_prefix$___fish_git_prompt_char_upstream_ahead"
|
||||
case "* 0" # behind upstream
|
||||
echo "$___fish_git_prompt_char_upstream_prefix$___fish_git_prompt_char_upstream_behind$behind"
|
||||
echo "$___fish_git_prompt_char_upstream_prefix$___fish_git_prompt_char_upstream_behind"
|
||||
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"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue