Re: [PATCH/RFC 0/5] Keep all info in command-list.txt in git binary
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Apr 9, 2018, 05:17 UTC
- Message-ID
- <CAPig+cTW7KRzXXY7vP-GZ23effYd5jLhiL15KqdRam4rNELCWw@mail.gmail.com>
- In-Reply-To
- <20180326165520.802-1-pclouds@gmail.com>
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.