aboutsummaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2013-02-12 13:20:42 +0100
committerJunio C Hamano <gitster@pobox.com>2013-02-12 10:06:25 -0800
commit66c0786ca59ec2f281fe9c78521b79f8bccfc954 (patch)
tree31bbd095201e2f65b447f478983cc148f9436e78 /contrib/completion
parentaa3982890fe7506badfddf6252402a335a4d72b7 (diff)
downloadgit-66c0786ca59ec2f281fe9c78521b79f8bccfc954.tar.gz
git-66c0786ca59ec2f281fe9c78521b79f8bccfc954.tar.xz
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<tab>", and _git_config to allow "git config --loc<tab>" 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 <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-completion.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index c8452fb16..059ba9d3e 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