git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
> 
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 7 in “completion: git-help: add missing option and params”
  1. 0/2 completion: git-help: add missing option and paramsRalf Thielow, Mar 24, 2016
  2. 1/2 completion: add option '--guides' to 'git help'Ralf Thielow, Mar 24, 2016
  3. Junio C HamanoMar 24, 2016
  4. 2/2 completion: add 'revisions' and 'everyday' to 'git help'Ralf Thielow, Mar 24, 2016
  5. Junio C HamanoMar 24, 2016
  6. Philip OakleyMar 24, 2016
  7. Junio C HamanoMar 24, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.