summary refs log tree commit diff
diff options
context:
space:
mode:
-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