1
0
mirror of https://github.com/git/git.git synced 2025-03-25 05:11:09 +00:00

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>
This commit is contained in:
Matthieu Moy 2013-02-12 13:20:42 +01:00 committed by Junio C Hamano
parent aa3982890f
commit 66c0786ca5

@ -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