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

[PATCH 1/4] _git: reflog: complete references next to commands



'git reflog show' is the default subcommand, so

  git reflog <tab>

should complete subcommands and references.
---
 Completion/Unix/Command/_git | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index e3d7231..ea2d485 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -3069,7 +3069,9 @@ _git-reflog () {
           'delete:delete entries from reflog'
           'show:show log of ref')
 
-        _describe -t commands command commands && ret=0
+        _alternative \
+          'commands:: _describe -t commands command commands' \
+          'references:: __git_references' && ret=0
         ;;
       (option-or-argument)
         curcontext=${curcontext%:*}-$line[1]:
-- 
2.5.0.234.gefc8a62



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