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

1 messages from 2015-01-29 to 2015-01-29. Participants: Trygve Aaberge.
Thread: https://gitlist.dev/t/38470

## Trygve Aaberge, 2015-01-29 17:05

Subject: [PATCH] completion: Support exclude prefix, ^<rev>
Message-ID: <20150129170554.GP8104@aaberge.net>
URL: https://gitlist.dev/e/20150129170554.GP8104%40aaberge.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

```
