From: Matthieu Moy Date: Tue, 12 Feb 2013 12:20:42 +0000 (+0100) Subject: completion: support 'git config --local' X-Git-Tag: v1.8.2-rc0~9^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=66c0786ca59ec2f281fe9c78521b79f8bccfc954;p=thirdparty%2Fgit.git completion: support 'git config --local' This needs to be done in two places: __git_config_get_set_variables to allow clever completion of "git config --local --get foo", and _git_config to allow "git config --loc" to complete to --local. While we're there, change the order of options in the code to match git-config.txt. Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index c8452fb163..059ba9d3e4 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1779,7 +1779,7 @@ __git_config_get_set_variables () while [ $c -gt 1 ]; do word="${words[c]}" case "$word" in - --global|--system|--file=*) + --system|--global|--local|--file=*) config_file="$word" break ;; @@ -1885,7 +1885,7 @@ _git_config () case "$cur" in --*) __gitcomp " - --global --system --file= + --system --global --local --file= --list --replace-all --get --get-all --get-regexp --add --unset --unset-all