git-completion: offer references for 'git reflog'
PATCH 1/1 git-completion: offer references for 'git reflog'
'git reflog <ref>' is a valid command, therefore offer reference completion.
--- contrib/completion/git-completion.bash | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
contrib/completion/git-completion.bash +1 -1
@@ -1774,7 +1774,7 @@ _git_reflog () local subcommand="$(__git_find_on_cmdline "$subcommands")" if [ -z "$subcommand" ]; then - __gitcomp "$subcommands" + __gitcomp "$subcommands $(__git_refs)" else __gitcomp "$(__git_refs)" fi
Signature · 1 line
1.7.7.rc3
Quoted 13 lines · Michael Schubert
'git reflog <ref>' is a valid command, therefore offer reference completion.
Signed-off-by Michael Schubert <[email protected]>--- contrib/completion/git-completion.bash | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)contrib/completion/git-completion.bash +0
-0
contrib/completion/git-completion.bash _git_reflog () · line 1780
Quoted 8 lines
contrib/completion/git-completion.bash +1
-1@@ -1774,7 +1774,7 @@ _git_reflog () local subcommand="$(__git_find_on_cmdline "$subcommands")" if [ -z "$subcommand" ]; then - __gitcomp "$subcommands" + __gitcomp "$subcommands $(__git_refs)" else __gitcomp "$(__git_refs)" fi
Ping.?
Quoted 16 lines · Michael Schubert
Quoted 15 lines · Michael Schubert
'git reflog <ref>' is a valid command, therefore offer reference completion.
Signed-off-by Michael Schubert <[email protected]>--- contrib/completion/git-completion.bash | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)contrib/completion/git-completion.bash +0
-0@@ -1774,7 +1774,7 @@ _git_reflog () local subcommand="$(__git_find_on_cmdline "$subcommands")"
Quoted 8 lines
contrib/completion/git-completion.bash _git_reflog () · line 1780
Quoted 6 lines
contrib/completion/git-completion.bash +1
-1if [ -z "$subcommand" ]; then - __gitcomp "$subcommands" + __gitcomp "$subcommands $(__git_refs)" else __gitcomp "$(__git_refs)" fiPing.?
Personally I think this change will give much less pleasant user experience. This is what I currently get:
$ git reflog <TAB>
delete expire show
$ git reflogand after learning the "show" subcommand exists, this is what I would get:
$ git reflog show <TAB>
Display all 626 possibilities? (y or n)With your change, I would get:
$ git reflog <TAB>
Display all 629 possibilities? (y or n)and do not even have a chance to remind myself if the subcommand to drop a reflog was "delete" or "remove".
At least when I know that I want to be reminded of refs to $verb (use one of the three subcommands I currently get in place of the "$verb"), I can say
$ git reflog $verb <TAB>
and at that point, I am willing to wade thru list of 600+ refs.
Quoted 36 lines · Junio C Hamano
Quoted 16 lines · Michael Schubert
Quoted 15 lines · Michael Schubert
'git reflog <ref>' is a valid command, therefore offer reference completion.
Signed-off-by Michael Schubert <[email protected]>--- contrib/completion/git-completion.bash | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)contrib/completion/git-completion.bash +0
-0@@ -1774,7 +1774,7 @@ _git_reflog () local subcommand="$(__git_find_on_cmdline "$subcommands")"Quoted 8 lines
contrib/completion/git-completion.bash _git_reflog () · line 1780
Quoted 6 lines
contrib/completion/git-completion.bash +1
-1if [ -z "$subcommand" ]; then - __gitcomp "$subcommands" + __gitcomp "$subcommands $(__git_refs)" else __gitcomp "$(__git_refs)" fiPing.?
Personally I think this change will give much less pleasant user experience. This is what I currently get:
$ git reflog <TAB> delete expire show $ git reflogand after learning the "show" subcommand exists, this is what I would get:
Quoted 7 lines
$ git reflog show <TAB> Display all 626 possibilities? (y or n)With your change, I would get:
$ git reflog <TAB> Display all 629 possibilities? (y or n)
Yeah, that would be a tradeoff. IMHO the current behaviour is pleasant for newcomers, but (I guess) most users would rather enjoy "the short form".
Quoted 10 lines
and do not even have a chance to remind myself if the subcommand to drop a reflog was "delete" or "remove".
At least when I know that I want to be reminded of refs to $verb (use one of the three subcommands I currently get in place of the "$verb"), I can say
$ git reflog $verb <TAB>and at that point, I am willing to wade thru list of 600+ refs.