Re: [Bash-completion-devel] [PATCH v2] completion: add new git_complete helper
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 21, 2012, 15:41 UTC
- Message-ID
- <CAMP44s1dNqokGuLg3ReLAreNBM++0NxOMUUk-=AgFBUy3n=E9w@mail.gmail.com>
- In-Reply-To
- <4F925FBC.2030406@iki.fi>
On Sat, Apr 21, 2012 at 10:20 AM, Ville Skyttä <ville.skytta@iki.fi> wrote:
Show 10 quoted lines
> 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