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

Re: [PATCH] completion: improve doc for complex aliases

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Sep 12, 2023, 12:13 UTC
Message-ID
<c84c75cc-a7e2-ae29-71d0-ea41a61a2d23@gmail.com>
In-Reply-To
<owlyil8gkxrm.fsf@fine.c.googlers.com>
Hi Linus,
Le 2023-09-11 à 21:04, Linus Arver a écrit :
Show 22 quoted lines
> Hi Philippe,
> 
> "Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> From: Philippe Blain <levraiphilippeblain@gmail.com>
>>
>> The completion code can be told to use a particular completion for
>> aliases that shell out by using ': git <cmd> ;' as the first command of
>> the alias. This only works if <cmd> and the semicolon are separated by a
>> space. The examples have that space but it's not clear if it's just for
>> style or if it's mandatory.
>>
>> Explicitely mention it.
> 
> It would be even more helpful if you explain _why_ it is mandatory in
> the commit message. Is there some Bash-specific behavior or something
> else going on here?
> 
> If you are unable to explain why, then as an alternative you could
> explain the error or buggy behavior (any error messages encountered, for
> example) you observe on your system when you do not use the space (which
> is corrected by applying the suggestion you are adding in this patch).

Yeah, I guess I did not investigate why it did not work without the space, it would be more complete if I did.

There's no error message though, it just does not work without the space (as I wrote in the commit message) in the sense that it won't suggest completion for the git command '<cmd>'.

I'll investigate and update the commit message.

Thanks, Philippe.

Previous: Linus ArverNext: Philippe Blain via GitGitGadget
Message 4 of 12 in “completion: improve doc for complex aliases”
  1. completion: improve doc for complex aliasesPhilippe Blain via GitGitGadget, Sep 9, 2023
  2. Eric SunshineSep 10, 2023
  3. Linus ArverSep 12, 2023
  4. Philippe BlainSep 12, 2023
  5. completion: improve doc for complex aliasesPhilippe Blain via GitGitGadget, Sep 12, 2023
  6. Junio C HamanoSep 13, 2023
  7. Linus ArverSep 14, 2023
  8. Linus ArverSep 14, 2023
  9. completion: loosen and document the requirement around completing aliasJunio C Hamano, Sep 20, 2023
  10. Junio C HamanoSep 20, 2023
  11. Linus ArverSep 22, 2023
  12. Junio C HamanoSep 22, 2023

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.