Skip to contentSkip to conversation

completion: Support exclude prefix, ^<rev>

PATCH New Trygve Aaberge 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 completion: Support exclude prefix, ^<rev>

When using the exclude pattern, ^<rev>, the completion did not work. This enables completion after ^ in the same way that completion after .. is done.

---
 contrib/completion/git-completion.bash | 4 ++++
 1 file changed, 4 insertions(+)
contrib/completion/git-completion.bash +4 -0
index 8cfee95..3036dac 100644
@@ -496,6 +496,10 @@ __git_complete_revlist_file ()
 		cur_="${cur_#*..}"
 		__gitcomp_nl "$(__git_refs)" "$pfx" "$cur_"
 		;;
+	^*)
+		cur_="${cur_#^}"
+		__gitcomp_nl "$(__git_refs)" "^" "$cur_"
+		;;
 	*)
 		__gitcomp_nl "$(__git_refs)"
 		;;
Signature · 1 line
2.2.2