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

Re: [PATCH] bash-completion: Add non-command git help files to bash-completion

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 15, 2008, 18:50 UTC
Message-ID
<7vvdy29kok.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<48A5CC07.2040500@griep.us>
Marcus Griep <marcus@griep.us> writes:
Show 13 quoted lines
> Junio C Hamano wrote:
>> Marcus Griep <marcus@griep.us> writes:
>> 
>>> Git allows access to the gitattributes man page via `git help attributes`,
>>> but this is not discoverable via the bash-completion mechanism.  This
>>> patch adds all current non-command man pages to the completion candidate
>>> list.
>> 
>> I really do not think this belongs to completion.  "git help topics"
>> perhaps.
>
> I'm not sure I grok what you mean here...  These items are already accessible
> from `git help`, they just aren't discoverable...

That is exactly what I mean. I do not think bloating shell completion to enumerate what help topics there are when the user hits "git help <TAB>" is a good idea to begin with. It is a maintenance nightmere for one thing, and it does not help non-bash users.

	$ git help
	$ git help --all

are existing ways for you to get list of "command topics" that you can ask the help system about, but I do not see a way to ask "git-help, please tell me what topics that are not git-commands can I ask you about?", hence my suggestion to add "git help topics".

And if you based "git help <TAB>" completion on the output from such help subcommand, you would not have to maintain the list of topics yourself in the completion script, and I would not mind such a patch too much.

Previous: Marcus GriepNext: Marcus Griep
Message 9 of 12 in “bash-completion: Add non-command git help files to bash-completion”
  1. bash-completion: Add non-command git help files to bash-completionMarcus Griep, Aug 15, 2008
  2. Jonathan NiederAug 15, 2008
  3. Marcus GriepAug 15, 2008
  4. bash-completion: Add non-command git help files to bash-completionMarcus Griep, Aug 15, 2008
  5. Shawn O. PearceAug 15, 2008
  6. Junio C HamanoAug 16, 2008
  7. Junio C HamanoAug 15, 2008
  8. Marcus GriepAug 15, 2008
  9. Junio C HamanoAug 15, 2008
  10. Marcus GriepAug 15, 2008
  11. Pieter de BieAug 15, 2008
  12. Marcus GriepAug 15, 2008

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.