From: Philip Oakley Date: Wed, 11 Apr 2018 22:06:30 GMT Subject: Re: [PATCH/RFC 0/5] Keep all info in command-list.txt in git binary Message-ID: In-Reply-To: From: "Eric Sunshine" Monday, April 09, 2018 6:17 AM On Mon, Mar 26, 2018 at 12:55 PM, Nguyễn Thái Ngọc Duy wrote: > 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. > 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