Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] _git: stash: save: _guard the message argument to not start with a '-'



Without this patch it isn't possible to cycle through the options in
menu completion when completing 'git stash save -<tab>'.

The same solution is used in _git-for-each-ref().
---
 Completion/Unix/Command/_git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 606b5e0..719f170 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1536,7 +1536,7 @@ _git-stash () {
             '(--keep-index                )--no-keep-index[all changes already added to the index are undone]' \
             '(-q --quiet)'{-q,--quiet}'[suppress all output]' \
             '(-u --include-untracked)'{-u,--include-untracked}'[include untracked files]' \
-            '::message' && ret=0
+            ':: :_guard "([^-]?#|)" message' && ret=0
           ;;
         (list)
           local -a log_options revision_options
-- 
1.9.1.286.g5172cb3



Messages sorted by: Reverse Date, Date, Thread, Author