Re: [PATCH 2/2] completion: add 'revisions' and 'everyday' to 'git help'
- From
Philip Oakley <philipoakley@iee.org>
- Date
- Mar 24, 2016, 20:15 UTC
- Message-ID
- <B40A8BBB3787424787785220EA6BFCFE@PhilipOakley>
- In-Reply-To
- <xmqq7fgr8wqc.fsf@gitster.mtv.corp.google.com>
From: "Junio C Hamano" <gitster@pobox.com>
Show 15 quoted lines
> Ralf Thielow <ralf.thielow@gmail.com> writes: > >> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> >> --- >> contrib/completion/git-completion.bash | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) > > It is somewhat silly that we have to maintain this list to be in > sync with the set of documents we offer. Wouldn't it make more > sense to go in the direction of _removing_ this list of hardcoded > words here? > > The first step may be to teach a new subcommand to "git help" > to show a list of these words, and then _git_help can use it to > lazily compute the list just like __git_commands does.
'git help -a' (or --all) already determines the list of commands available, but then formats it prettily for user consumption. Maybe an alternate --list option?
Show 28 quoted lines
> > But this change itself is not wrong per-se; will queue to see where > follow-up discussion will lead us to. > > Thanks. > > >> diff --git a/contrib/completion/git-completion.bash >> b/contrib/completion/git-completion.bash >> index 70f4171..ffe6004 100644 >> --- a/contrib/completion/git-completion.bash >> +++ b/contrib/completion/git-completion.bash >> @@ -1346,8 +1346,8 @@ _git_help () >> __git_compute_all_commands >> __gitcomp "$__git_all_commands $(__git_aliases) >> attributes cli core-tutorial cvs-migration >> - diffcore gitk glossary hooks ignore modules >> - namespaces repository-layout tutorial tutorial-2 >> + diffcore everyday gitk glossary hooks ignore modules >> + namespaces repository-layout revisions tutorial tutorial-2 >> workflows >> " >> } > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >