Re: [PATCH v2] completion: add new git_complete helper
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 16, 2012, 15:54 UTC
- Message-ID
- <7vaa2by8nj.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CAMP44s0PWAV=nD1xnAFMx8OPby88W2jKwDGtiUFY4LA93D-gAw@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 10 quoted lines
> On Mon, Apr 16, 2012 at 12:37 AM, Jonathan Nieder <jrnieder@gmail.com> wrote: >> The completion script has so far stuck to a limited namespace: >> >> _git_* (completion functions) >> __git_* (everything else, including public interfaces like __git_ps1) >> >> A name like __git_complete should work, presumably. > > Perhaps it's time to avoid the __ prefix for public interfaces; > otherwise how would people know they are public?
We could do the same as __git_ps1, no? People know to use it already; they know it is public.
I am OK with introducing git_ps1 while keeping __git_ps1 as an equivalent and declare that git_$anything will be the surface interface for end users to *use* the machinery we provide, though. Then git_complete could be introduced without __git_complete equivalent. Probably _git_$name has to stay an implementation detail (i.e. the users can use it but it is their responsibility to update their using script when the implementation changes).