Re: [PATCH 3/3] completion: use specified file (if any) when completing config vars

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stephen Boyd <bebarino@xxxxxxxxx> wrote:
> Only list the variables that can actually be affected by the command by
> searching the arguments for a config file setting.

Wow, this is a lot of magic.

Try:

  git config --global remote.gitster.url $(git config remote.o<TAB>

You'll complete against --global, not the local repository.

 
>  __git_config_get_set_variables ()
>  {
> -	for i in $(git --git-dir="$(__gitdir)" config --list); do
> +	local args="--global --system --file= -f"
> +	local config_file="$(__git_find_argument_and_value "$args")"
> +	for i in $(git --git-dir="$(__gitdir)" config $config_file --list \
> +			2>/dev/null); do

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]