[PATCH] git-completion: offer references for 'git reflog'

Subsystems: the rest

STALE3738d

2 messages, 1 author, 2016-06-15 · open the first message on its own page

[PATCH] git-completion: offer references for 'git reflog'

From: Michael Schubert <hidden>
Date: 2016-06-15 22:52:06

'git reflog <ref>' is a valid command, therefore offer reference
completion.

Signed-off-by: Michael Schubert <redacted>
---
 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 8648a36..63d0f08 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -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
-- 
1.7.7.rc3

Re: [PATCH] git-completion: offer references for 'git reflog'

From: Michael Schubert <hidden>
Date: 2016-06-15 22:52:10

On 09/25/2011 12:42 PM, Michael Schubert wrote:
quoted hunk
'git reflog <ref>' is a valid command, therefore offer reference
completion.

Signed-off-by: Michael Schubert <redacted>
---
 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 8648a36..63d0f08 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -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.?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help