From: "Shawn O. Pearce" <spearce@spearce•org>
To: Stephen Boyd <bebarino@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH 3/3] completion: use specified file (if any) when completing config vars
Date: Thu, 7 May 2009 08:12:07 -0700 [thread overview]
Message-ID: <20090507151207.GQ30527@spearce.org> (raw)
In-Reply-To: <1241677093-29937-2-git-send-email-bebarino@gmail.com>
Stephen Boyd <bebarino@gmail•com> 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.
next prev parent reply other threads:[~2009-05-07 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-07 6:15 [PATCH 1/3] completion: complete config variables for --get/getall/unset/unset-all Stephen Boyd
2009-05-07 6:15 ` [PATCH 2/3] completion: add find_argument_and_value() function Stephen Boyd
2009-05-07 6:18 ` Stephen Boyd
2009-05-07 6:18 ` [PATCH 3/3] completion: use specified file (if any) when completing config vars Stephen Boyd
2009-05-07 15:12 ` Shawn O. Pearce [this message]
2009-05-07 19:55 ` Stephen Boyd
2009-05-09 1:00 ` Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090507151207.GQ30527@spearce.org \
--to=spearce@spearce$(echo .)org \
--cc=bebarino@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox