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

Re: [PATCH v2] completion: add new git_complete helper

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 16, 2012, 20:42 UTC
Message-ID
<CAMP44s0Q2A_oKJx27ct9W__KVQkQxzst3H7gq6sZDhrCLDQaag@mail.gmail.com>
In-Reply-To
<20120416203320.GF12613@burratino>
On Mon, Apr 16, 2012 at 11:33 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 16 quoted lines
> Felipe Contreras wrote:
>> On Mon, Apr 16, 2012 at 11:09 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>>> Felipe Contreras wrote:
>
>>>> I would like to see a completion script that actually has a function
>>>> supposed to be exported and that still uses the _ prefix anyway.
>>>
>>> The /etc/bash_completion library itself exports lots and lots of
>>> functions with a _ prefix.
>>
>> We are not making a bash_completion library; I mean a bash completion
>> script (other than the library).
>
> Ok.  If you refuse to put two and two together, then I will (as usual
> when this happens) just be a little passive aggressive and annoyed and
> let you talk to other people.

Just to be clear; we are making a completion script for the 'git' command, so if we are looking for guidance on what other 'foo' command completion scripts do, the bash completion library itself is not good guidance.

My gut feeling is that there's no completion script that exports functions meant to be used directly by the user, so there's really no guidance for this.

Now, even if you use the bash completion library, it still does export functions without a prefix, so why take the ones with prefix as a rule, and ignore the other ones? It seems like there's no real guideline for what gets a prefix and what doesn't, even in the bash completion library itself, which I don't think should be used a guideline anyway.

The closest relative of 'git_complete' would be 'complete', both of course are meant for public usage. I have not seen any other functions that are similar.

Cheers.
-- 
Felipe Contreras
Previous: Jonathan NiederNext: Jonathan Nieder
Message 11 of 40 in “completion: add new git_complete helper”
  1. completion: add new git_complete helperFelipe Contreras, Apr 15, 2012
  2. Jonathan NiederApr 15, 2012
  3. Felipe ContrerasApr 16, 2012
  4. Junio C HamanoApr 16, 2012
  5. Jonathan NiederApr 16, 2012
  6. Junio C HamanoApr 16, 2012
  7. Felipe ContrerasApr 16, 2012
  8. Jonathan NiederApr 16, 2012
  9. Felipe ContrerasApr 16, 2012
  10. Jonathan NiederApr 16, 2012
  11. Felipe ContrerasApr 16, 2012
  12. Jonathan NiederApr 16, 2012
  13. Felipe ContrerasApr 16, 2012
  14. Jonathan NiederApr 16, 2012
  15. Ville SkyttäApr 21, 2012
  16. Felipe ContrerasApr 21, 2012
  17. Ville SkyttäApr 21, 2012
  18. Felipe ContrerasApr 22, 2012
  19. Junio C HamanoApr 16, 2012
  20. Felipe ContrerasApr 16, 2012
  21. Jonathan NiederApr 16, 2012
  22. Felipe ContrerasApr 16, 2012
  23. Jonathan NiederApr 16, 2012
  24. Jonathan NiederApr 16, 2012
  25. Felipe ContrerasApr 17, 2012
  26. Jonathan NiederApr 17, 2012
  27. Felipe ContrerasApr 17, 2012
  28. Jonathan NiederApr 17, 2012
  29. Jonathan NiederApr 17, 2012
  30. Jonathan NiederApr 16, 2012
  31. SZEDER GáborApr 16, 2012
  32. Felipe ContrerasApr 16, 2012
  33. Junio C HamanoApr 17, 2012
  34. Felipe ContrerasApr 17, 2012
  35. Junio C HamanoApr 17, 2012
  36. Felipe ContrerasApr 17, 2012
  37. Jonathan NiederApr 17, 2012
  38. SZEDER GáborApr 17, 2012
  39. Felipe ContrerasApr 17, 2012
  40. SZEDER GáborApr 17, 2012

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.