diff options
author | 2013-07-27 10:59:50 -0400 | |
---|---|---|
committer | 2013-07-30 11:31:24 +0800 | |
commit | c4bc216815db36fbfbccd1adda255c40314c8ebb (patch) | |
tree | ae0143eb4de0540d65abcd8a0ccff3e7b1107f66 /share | |
parent | 3af40efdb1e9799a14931eacdc4a4ee7703cf951 (diff) |
git_prompt: Informative upstream with informative status
This makes $__fish_git_prompt_showupstream = "auto" mean "informative"
instead of "git" if $__fish_git_prompt_show_informative_status is set.
Diffstat (limited to 'share')
-rw-r--r-- | share/functions/__fish_git_prompt.fish | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish index e1f9a8fd..485f5d1d 100644 --- a/share/functions/__fish_git_prompt.fish +++ b/share/functions/__fish_git_prompt.fish @@ -162,6 +162,11 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi set -l legacy set -l verbose + # Default to informative if show_informative_status is set + if test -n "$__fish_git_prompt_show_informative_status" + set informative 1 + end + set -l svn_remote # get some config options from git-config git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' ^/dev/null | tr '\0\n' '\n ' | while read -l key value @@ -186,16 +191,20 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi end # parse configuration variables + # and clear informative default when needed for option in $show_upstream switch $option case git svn set upstream $option + set -e informative case verbose set verbose 1 + set -e informative case informative set informative 1 case legacy set legacy 1 + set -e informative end end |