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.