From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28951 invoked by alias); 21 Aug 2010 12:21:34 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28182 Received: (qmail 26025 invoked from network); 21 Aug 2010 12:21:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at schrab.com designates 208.78.100.134 as permitted sender) From: Aaron Schrab To: zsh-workers@zsh.org Subject: [PATCH] _git: Add completion for help subcommand Date: Sat, 21 Aug 2010 08:21:03 -0400 Message-Id: <1282393263-16767-1-git-send-email-aaron@schrab.com> X-Mailer: git-send-email 1.7.1 --- Completion/Unix/Command/_git | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index c394e08..50b503a 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' @@ -490,6 +491,19 @@ _git-hash-object () { '(--stdin):file:_files' && ret=0 } +(( $+functions[_git-help] )) || +_git-help () { + local formats='(--info -i --man -m --web -w)' + _arguments -S \ + - '(all)' \ + {--all,-a}'[List all available commands]' \ + - 'format' \ + "$formats"{--man,-m}'[Display help in man page format]' \ + "$formats"{--info,-i}'[Display help in info format]' \ + "$formats"{--web,-w}'[Display help in web browser]' \ + ':command:_git_commands' && ret=0 +} + (( $+functions[_git-index-pack] )) || _git-index-pack () { local -a stdin_arguments -- 1.7.1