about summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2010-12-04 18:08:12 +0000
committerWayne Davison <wayned@users.sourceforge.net>2010-12-04 18:08:12 +0000
commitddee5deb2dda383d597af69971cb8d85e3dc1598 (patch)
treeb3964b50b2327765d7470a00b1078c32c8a5699d /Completion/Unix/Command
parente5ddd5b62f794e262119053c367ab66eca678475 (diff)
downloadzsh-ddee5deb2dda383d597af69971cb8d85e3dc1598.tar.gz
zsh-ddee5deb2dda383d597af69971cb8d85e3dc1598.tar.xz
zsh-ddee5deb2dda383d597af69971cb8d85e3dc1598.zip
Add completion for help subcommand to _git.
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_git14
1 files changed, 14 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index af716be85..8e54f3d90 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -190,6 +190,7 @@ _git_commands () {
     'fetch:download objects and a head from another repository'
     'gc:cleanup unnecessary files and optimize the local repository'
     'grep:print lines matching a pattern'
+    'help:display help information about git subcommands'
     'init:create empty git object database'
     'log:show commit logs'
     'merge:grand unified merge driver'
@@ -492,6 +493,19 @@ _git-hash-object () {
     '(--stdin):file:_files' && ret=0
 }
 
+(( $+functions[_git-help] )) ||
+_git-help () {
+  _arguments -S \
+    ':command:_git_commands' \
+    - '(all)' \
+    '(:)'{--all,-a}'[List all available commands]' \
+    - '(format)' \
+    {--man,-m}'[Display help in man page format]' \
+    {--info,-i}'[Display help in info format]' \
+    {--web,-w}'[Display help in web browser]' \
+    && ret=0
+}
+
 (( $+functions[_git-index-pack] )) ||
 _git-index-pack () {
   local -a stdin_arguments