summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_git9
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b3a0a649f..80edc8fdf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-01  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* 36722: Completion/Unix/Command/_git: allow range to complete
+	after ^, taking acoount of backslash quoting.
+
 2015-10-01  Mikael Magnusson  <mikachu@gmail.com>
 
 	* 36709: Doc/Zsh/zle.yo, Functions/Zle/bracketed-paste-url-magic,
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 40a9fb63b..1fcde9015 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5753,7 +5753,14 @@ __git_commit_ranges () {
   if compset -P '*..(.|)'; then
     expl=( $* )
   else
-    compset -S '..*' || suf=( -S .. -r '.@~ ^:\t\n\-' )
+    if ! compset -S '..*'; then
+      local match mbegin mend
+      if [[ ${PREFIX} = (#b)((\\|)\^)* ]]; then
+	compset -p ${#match[1]}
+      else
+	suf=( -S .. -r '.@~ ^:\t\n\-' )
+      fi
+    fi
     expl=( $* $suf )
   fi