about summary refs log tree commit diff
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
parente5ddd5b62f794e262119053c367ab66eca678475 (diff)
downloadzsh-ddee5deb2dda383d597af69971cb8d85e3dc1598.tar.gz
zsh-ddee5deb2dda383d597af69971cb8d85e3dc1598.tar.xz
zsh-ddee5deb2dda383d597af69971cb8d85e3dc1598.zip
Add completion for help subcommand to _git.
-rw-r--r--ChangeLog9
-rw-r--r--Completion/Unix/Command/_git14
2 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 42f090136..1d7cb66f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-04  Wayne Davison  <wayned@users.sourceforge.net>
+
+	* Aaron Schrab: 28210: Completion/Unix/Command/_git: add completion
+	for help subcommand.
+
 2010-12-03  Peter Stephenson  <pws@csr.com>
 
 	* 28468: Completion/Unix/Command/_man: if argument contains a
@@ -1544,7 +1549,7 @@
 
 	* Greg Klanderman: 27391: Completion/Unix/Command/_rm:
 	 fix ignored (duplicate) file names
-	
+
 	* users/14548: Src/Modules/termcap.c: prevent libtermcap from
 	exiting on an unknown terminal type
 
@@ -13878,5 +13883,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5133 $
+* $Revision: 1.5134 $
 *****************************************************
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