Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: [PATCH] bash completion: complete refs for git-grep

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:47:32

Thomas Rast [off-list ref] wrote:
quoted
So I'll roll a simpler patch that just always (before --) completes
refs instead, if that's ok.
Hard to argue with that logic.  :-)

Acked-by: Shawn O. Pearce <redacted>
quoted hunk ↗ jump to hunk
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 6fd7e1d..b08cd77 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1048,7 +1048,8 @@ _git_grep ()
 		return
 		;;
 	esac
-	COMPREPLY=()
+
+	__gitcomp "$(__git_refs)"
 }
-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help