* [PATCH 0/2] completion: git-help: add missing option and params
@ 2016-03-24 18:27 Ralf Thielow
2016-03-24 18:27 ` [PATCH 1/2] completion: add option '--guides' to 'git help' Ralf Thielow
2016-03-24 18:27 ` [PATCH 2/2] completion: add 'revisions' and 'everyday' " Ralf Thielow
0 siblings, 2 replies; 7+ messages in thread
From: Ralf Thielow @ 2016-03-24 18:27 UTC (permalink / raw)
To: git; +Cc: Ralf Thielow
The bash completion is missing the option '--guides' for 'git-help'
and some params you see there. Add them both.
Ralf Thielow (2):
completion: add option '--guides' to 'git help'
completion: add 'revisions' and 'everyday' to 'git help'
contrib/completion/git-completion.bash | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.8.0.rc4.7.g35d7ca9.dirty
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] completion: add option '--guides' to 'git help'
2016-03-24 18:27 [PATCH 0/2] completion: git-help: add missing option and params Ralf Thielow
@ 2016-03-24 18:27 ` Ralf Thielow
2016-03-24 20:01 ` Junio C Hamano
2016-03-24 18:27 ` [PATCH 2/2] completion: add 'revisions' and 'everyday' " Ralf Thielow
1 sibling, 1 reply; 7+ messages in thread
From: Ralf Thielow @ 2016-03-24 18:27 UTC (permalink / raw)
To: git; +Cc: Ralf Thielow
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
---
contrib/completion/git-completion.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index e3918c8..70f4171 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1339,7 +1339,7 @@ _git_help ()
{
case "$cur" in
--*)
- __gitcomp "--all --info --man --web"
+ __gitcomp "--all --guides --info --man --web"
return
;;
esac
--
2.8.0.rc4.7.g35d7ca9.dirty
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] completion: add option '--guides' to 'git help'
2016-03-24 18:27 ` [PATCH 1/2] completion: add option '--guides' to 'git help' Ralf Thielow
@ 2016-03-24 20:01 ` Junio C Hamano
0 siblings, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2016-03-24 20:01 UTC (permalink / raw)
To: Ralf Thielow; +Cc: git
Ralf Thielow <ralf.thielow@gmail.com> writes:
> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
> ---
> contrib/completion/git-completion.bash | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Sounds sensible. Thanks.
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index e3918c8..70f4171 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1339,7 +1339,7 @@ _git_help ()
> {
> case "$cur" in
> --*)
> - __gitcomp "--all --info --man --web"
> + __gitcomp "--all --guides --info --man --web"
> return
> ;;
> esac
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] completion: add 'revisions' and 'everyday' to 'git help'
2016-03-24 18:27 [PATCH 0/2] completion: git-help: add missing option and params Ralf Thielow
2016-03-24 18:27 ` [PATCH 1/2] completion: add option '--guides' to 'git help' Ralf Thielow
@ 2016-03-24 18:27 ` Ralf Thielow
2016-03-24 20:08 ` Junio C Hamano
1 sibling, 1 reply; 7+ messages in thread
From: Ralf Thielow @ 2016-03-24 18:27 UTC (permalink / raw)
To: git; +Cc: Ralf Thielow
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
---
contrib/completion/git-completion.bash | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
"
}
--
2.8.0.rc4.7.g35d7ca9.dirty
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] completion: add 'revisions' and 'everyday' to 'git help'
2016-03-24 18:27 ` [PATCH 2/2] completion: add 'revisions' and 'everyday' " Ralf Thielow
@ 2016-03-24 20:08 ` Junio C Hamano
2016-03-24 20:51 ` Philip Oakley
0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2016-03-24 20:08 UTC (permalink / raw)
To: Ralf Thielow; +Cc: git
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.
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
> "
> }
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] completion: add 'revisions' and 'everyday' to 'git help'
2016-03-24 20:08 ` Junio C Hamano
@ 2016-03-24 20:51 ` Philip Oakley
2016-03-24 21:45 ` Junio C Hamano
0 siblings, 1 reply; 7+ messages in thread
From: Philip Oakley @ 2016-03-24 20:51 UTC (permalink / raw)
To: Junio C Hamano, Ralf Thielow; +Cc: git
From: "Junio C Hamano" <gitster@pobox.com>
> 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?
>
> 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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] completion: add 'revisions' and 'everyday' to 'git help'
2016-03-24 20:51 ` Philip Oakley
@ 2016-03-24 21:45 ` Junio C Hamano
0 siblings, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2016-03-24 21:45 UTC (permalink / raw)
To: Philip Oakley; +Cc: Ralf Thielow, git
"Philip Oakley" <philipoakley@iee.org> writes:
>> 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?
Yes, that is exactly what I meant.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-03-24 21:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-24 18:27 [PATCH 0/2] completion: git-help: add missing option and params Ralf Thielow
2016-03-24 18:27 ` [PATCH 1/2] completion: add option '--guides' to 'git help' Ralf Thielow
2016-03-24 20:01 ` Junio C Hamano
2016-03-24 18:27 ` [PATCH 2/2] completion: add 'revisions' and 'everyday' " Ralf Thielow
2016-03-24 20:08 ` Junio C Hamano
2016-03-24 20:51 ` Philip Oakley
2016-03-24 21:45 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).