git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 26, 2010, 20:17 UTC
Message-ID
<20100226201743.GB24776@spearce.org>
In-Reply-To
<7vmxyvsqzn.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> > ...  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.
Previous: Junio C HamanoNext: David Rhodes Clymer
Message 22 of 25 in “Custom git completion”
  1. David Rhodes ClymerJan 29, 2010
  2. Shawn O. PearceJan 29, 2010
  3. Junio C HamanoJan 29, 2010
  4. Shawn O. PearceJan 29, 2010
  5. Junio C HamanoJan 29, 2010
  6. bash: support user-supplied completion scripts for user's git commandsSZEDER Gábor, Jan 29, 2010
  7. Shawn O. PearceJan 29, 2010
  8. SZEDER GáborJan 29, 2010
  9. Shawn O. PearceJan 29, 2010
  10. SZEDER GáborJan 31, 2010
  11. 0/4 bash: support user-supplied completion scripts for custom git commands and aliasesSZEDER Gábor, Feb 23, 2010
  12. 1/4 bash: improve aliased command recognitionSZEDER Gábor, Feb 23, 2010
  13. Junio C HamanoFeb 23, 2010
  14. SZEDER GáborFeb 24, 2010
  15. Junio C HamanoFeb 24, 2010
  16. 2/4 bash: support user-supplied completion scripts for user's git commandsSZEDER Gábor, Feb 23, 2010
  17. 3/4 bash: support user-supplied completion scripts for aliasesSZEDER Gábor, Feb 23, 2010
  18. 4/4 bash: completion for gitk aliasesSZEDER Gábor, Feb 23, 2010
  19. Junio C HamanoJan 29, 2010
  20. SZEDER GáborFeb 26, 2010
  21. Junio C HamanoFeb 26, 2010
  22. Shawn O. PearceFeb 26, 2010
  23. David Rhodes ClymerJan 30, 2010
  24. David Rhodes ClymerJan 30, 2010
  25. David Rhodes ClymerJan 30, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.