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

From: Junio C Hamano <[email-masked]>
Date: Fri, 15 Aug 2008 11:50:51 -0700

Marcus Griep <[email-masked]> writes:

> Junio C Hamano wrote:
>> Marcus Griep <[email-masked]> 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.