git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] completion: Support exclude prefix, ^<rev>

From
Trygve Aaberge <trygveaa@gmail.com>
Date
Jan 29, 2015, 17:05 UTC
Message-ID
<20150129170554.GP8104@aaberge.net>

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

Signed-off-by: Trygve Aaberge <trygveaa@gmail.com>
---
 contrib/completion/git-completion.bash | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 8cfee95..3036dac 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -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)"
 		;;
-- 
2.2.2
Message 1 of 1 in “completion: Support exclude prefix, ^<rev>”
  1. completion: Support exclude prefix, ^<rev>Trygve Aaberge, Jan 29, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.