Skip to content

Commit

Permalink
completion: support 'git config --local'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthieu Moy authored and Junio C Hamano committed Feb 12, 2013
1 parent aa39828 commit 66c0786
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 66c0786

Please sign in to comment.