git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Stephen Boyd <bebarino@gmail.com>
Date
May 9, 2009, 01:00 UTC
Message-ID
<4A04D5A9.1090901@gmail.com>
In-Reply-To
<780e0a6b0905071255g4ade6316oace6a2be6a6d2@mail.gmail.com>
Stephen Boyd wrote:
Show 15 quoted lines
> On Thu, May 7, 2009 at 8:12 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
>> 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
>
> Yeah, I didn't think it would be very robust. Is it a good idea to
> keep going down this path, or is it too magical? This example could be
> fixed by searching the words backwards, but I imagine there is some
> other case where that will fail. Also, --global and --system don't
> have values, so right now it's all wrong (i.e. config_file is
> "--global remote.gitster.url" for this example).

After further investigation, I can't get the tab completion you talk about here to work at all. Should it work?

I've reworked this into two patches which I'll send as a follow up soon.
Previous: Stephen Boyd
Message 7 of 7 in “completion: complete config variables for --get/getall/unset/unset-all”
  1. 1/3 completion: complete config variables for --get/getall/unset/unset-allStephen Boyd, May 7, 2009
  2. 2/3 completion: add find_argument_and_value() functionStephen Boyd, May 7, 2009
  3. 2/3 completion: add find_argument_and_value() functionStephen Boyd, May 7, 2009
  4. 3/3 completion: use specified file (if any) when completing config varsStephen Boyd, May 7, 2009
  5. Shawn O. PearceMay 7, 2009
  6. Stephen BoydMay 7, 2009
  7. Stephen BoydMay 9, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.