Subject: [PATCH 1/4] _git: reflog: complete references next to commands
From: m0viefreak <[email-masked]>
To: [email-masked]
Cc: m0viefreak <[email-masked]>
Date: Sun, 13 Mar 2016 23:01:57 +0100
List-Id: Zsh Workers List <zsh-workers.zsh.org>

'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