about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_git10
2 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index feb98eb28..4cef4ca4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,9 @@
 	* 31744: Completion/Unix/Command/_git: _git: make git submodule
 	<cmd> completion work
 
+	* 31745: Completion/Unix/Command/_git: _git: correctly use
+	__git_guard_number in some cases
+
 2013-09-21  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* unposted: Src/glob.c: improve an error message.
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 0f4ead334..6797f9c49 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -850,7 +850,7 @@ _git-grep () {
     '(-a --text)'{-a,--text}'[process binary files as if they were text]' \
     '(-i --ignore-case)'{-i,--ignore-case}'[ignore case when matching]' \
     '-I[do not match pattern in binary files]' \
-    '--max-depth=[descend at most given levels of directories]:__git_guard_number depth' \
+    '--max-depth=[descend at most given levels of directories]: :__git_guard_number depth' \
     '(-w --word-regexp)'{-w,--word-regexp}'[match only whole words]' \
     '(-v --invert-match)'{-v,--invert-match}'[select non-matching lines]' \
     '(   -H)-h[supress output of filenames]' \
@@ -2548,7 +2548,7 @@ _git-config () {
             (umask)
               _alternative \
                 'values:value:(user)' \
-                'umasks::__git_guard_number umask' && ret=0
+                'umasks: :__git_guard_number umask' && ret=0
               ;;
           esac
           ;;
@@ -2910,12 +2910,12 @@ _git-blame () {
     (line-range)
       if compset -P '([[:digit:]]#|/[^/]#(\\?[^/]#)#/),'; then
         _alternative \
-          'line-numbers::__git_guard_number "line number"' \
+          'line-numbers: :__git_guard_number "line number"' \
           'regexes::_guard "(/[^/]#(\\?[^/]#)#(/|)|)" regex' \
           'offsets::_guard "([+-][[:digit:]]#|)" "line offset"' && ret=0
       else
         _alternative \
-          'line-numbers::__git_guard_number "line number"' \
+          'line-numbers: :__git_guard_number "line number"' \
           'regexes::_guard "(/[^/]#(\\?[^/]#)#(/|)|)" regex' && ret=0
       fi
       ;;
@@ -3150,7 +3150,7 @@ _git-show-branch () {
     (limit-and-base)
       if compset -P '[[:digit:]]##,'; then
         _alternative \
-          'counts::__git_guard_number count' \
+          'counts: :__git_guard_number count' \
           'dates::__git_datetimes' && ret=0
       else
         __git_guard_number limit