mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Merge pull request #249 from kballard/git_prompt_showupstream
Fix showupstream behavior in __fish_git_prompt
This commit is contained in:
commit
390700ca71
1 changed files with 6 additions and 6 deletions
|
@ -83,12 +83,12 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi
|
||||||
set -l legacy
|
set -l legacy
|
||||||
set -l verbose
|
set -l verbose
|
||||||
set -l svn_url_pattern
|
set -l svn_url_pattern
|
||||||
set -l __fish_git_prompt_show_upstream $__fish_git_prompt_show_upstream
|
set -l show_upstream $__fish_git_prompt_showupstream
|
||||||
git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' ^/dev/null | tr '\0\n' '\n ' | while read -l key value
|
git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showUpstream)$' ^/dev/null | tr '\0\n' '\n ' | while read -l key value
|
||||||
switch $key
|
switch $key
|
||||||
case bash.showUpstream
|
case bash.showUpstream bash.showupstream
|
||||||
set __fish_git_prompt_show_upstream $value
|
set show_upstream $value
|
||||||
test -n "$__fish_git_prompt_showupstream"; or return
|
test -n "$show_upstream"; or return
|
||||||
case svn-remote.'*'.url
|
case svn-remote.'*'.url
|
||||||
set svn_remote $svn_remote $value
|
set svn_remote $svn_remote $value
|
||||||
set -l remote_prefix (/bin/sh -c 'echo "${1%.url}"' -- $key)
|
set -l remote_prefix (/bin/sh -c 'echo "${1%.url}"' -- $key)
|
||||||
|
@ -103,7 +103,7 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi
|
||||||
end
|
end
|
||||||
|
|
||||||
# parse configuration variables
|
# parse configuration variables
|
||||||
for option in $__fish_git_prompt_showupstream
|
for option in $show_upstream
|
||||||
switch $option
|
switch $option
|
||||||
case git svn
|
case git svn
|
||||||
set upstream $option
|
set upstream $option
|
||||||
|
|
Loading…
Reference in a new issue