Matthieu Moy <matthieu....@imag.fr> writes:

> 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....@imag.fr>
> ---
>> I think this line should include --local:
>> 
>> https://github.com/git/git/blob/next/contrib/completion/git-completion.bash#L1782
>>     "--global|--system|--file=*)"
>> 
>> This would help for:
>>     git config -l --local
>
> Yes, but not only ;-)

I see the second hunk is new.  Comments?

How would this interract with the writing side of "git config"?
"git config --local foo.bar value" and "git config foo.bar value"
are the same, no?

Is it "yes they are the same but it does not hurt?"

>  contrib/completion/git-completion.bash | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/completion/git-completion.bash 
> b/contrib/completion/git-completion.bash
> index 5770b6f..2e1ad67 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1570,7 +1570,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
>                       ;;
> @@ -1676,7 +1676,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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to