[Bash-completion-devel] [PATCH v2] completion: add new git_complete helper

Felipe Contreras felipe.contreras at gmail.com
Sat Apr 21 15:41:32 UTC 2012


On Sat, Apr 21, 2012 at 10:20 AM, Ville Skyttä <ville.skytta at iki.fi> wrote:
> On 2012-04-16 23:59, Jonathan Nieder wrote:
>
>> Hopefully this information helps clarify to what extent the leading
>> underscores in functions exposed by completion scripts are meant or
>> are not meant as a convention.
>
> We've discussed what a real "API" or "namespace" of bash-completion
> would look like, but so far nothing concrete has come out of it.
>
> http://thread.gmane.org/gmane.comp.shells.bash.completion.scm/2013/focus=3135

Thank you for pointing this out. This means I was correct; there
was/is no convention for public APIs.

According to that thread, the closest there is to a convention would
be to name it _GIT_complete. That would certainly avoid conflicts with
any current namespace, so I feel it's much better than __git_complete.

Still, I don't see the point in avoiding 'git_complete' and making our
lifes more difficult. Bash public functions, like *complete*, don't
have any special namespace, they just snatch them, and that's the end
of it. In the particular case of git, where would have only a couple
(currently 2) public functions, I don't see what's the big deal.

Cheers.

-- 
Felipe Contreras



More information about the Bash-completion-devel mailing list