Re: [PATCH v2] completion: add new git_complete helper
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:36
Felipe Contreras [off-list ref] writes:
On Mon, Apr 16, 2012 at 12:37 AM, Jonathan Nieder [off-list ref] wrote:quoted
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).