Re: [PATCH/RFC 0/5] Keep all info in command-list.txt in git binary
- From
Philip Oakley <philipoakley@iee.org>
- Date
- Apr 11, 2018, 22:06 UTC
- Message-ID
- <FBB059C530054EEAB2E989D86CBE3BD5@PhilipOakley>
- In-Reply-To
- <CAPig+cTW7KRzXXY7vP-GZ23effYd5jLhiL15KqdRam4rNELCWw@mail.gmail.com>
From: "Eric Sunshine" <sunshine@sunshineco.com> Monday, April 09, 2018 6:17 AM On Mon, Mar 26, 2018 at 12:55 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 13 quoted lines
> This is pretty rough but I'd like to see how people feel about this > first. > > I notice we have two places for command classification. One in > command-list.txt, one in __git_list_porcelain_commands() in > git-completion.bash. People who are following nd/parseopt-completion > probably know that I'm try to reduce duplication in this script as > much as possible, this is another step towards that. > > By keeping all information of command-list.txt in git binary, we could > provide the porcelain list to git-completion.bash via "git > --list-cmds=porcelain", so we don't neeed a separate command > classification in git-completion.bash anymore.
I like the direction this series is taking.
Show 5 quoted lines
> Because we have all command synopsis as a side effect, we could > now support "git help -a --verbose" which prints something like "git > help", a command name and a description, but we could do it for _all_ > recognized commands. This could help people look for a command even if > we don't provide "git appropos".
Nice idea, and you practically get this for free (aside from the the obvious new code) since generate-cmdlist.sh already plucks the summary for each command directly from Documentation/git-*.txt.
I'm only just catching up, but does/can this series also capture the non-command guides that are available in git so that the 'git help -g' can begin to list them all?
It was something I looked at some years ago (when I added the -g option) but at the time the idea of updating the command-list.txt was too invasive.
Just a thought.
Philip