Subject: Re: [PATCH] bash: support user-supplied completion scripts for user's git commands

From: "Shawn O. Pearce" <[email-masked]>
Date: Fri, 26 Feb 2010 12:17:43 -0800

Junio C Hamano <[email-masked]> wrote:
> > ...  BTW, Mercurial's
> > completion script uses _hg_cmd_foo() for hg commands and
> > _hg_ext_bar() for extensions, so we might as well be a bit consistent,
> > and call our completion functions _git_cmd_foo().
> 
> In Hg's context it might make sense to name a function _hg_cmd_foo vs
> _hg_ext_bar iff the end users need to be very aware of the distinction
> between commands and extensions, but for us I think "git_cmd_foo" is
> probably the most meaningless rename, as it doesn't add any extra
> information (we know 'git foo' is a command already without 'cmd').

I agree.  _git_cmd_foo is pointless.

But I would be ok with _git_completion_foo for the completion
function of git foo.  As Junio pointed out, better to do it now
before users start to really build their own extension library on
top of the package.

-- 
Shawn.