Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _git: Add completion for help subcommand
- X-seq: zsh-workers 28467
- From: Aaron Schrab <aaron@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: _git: Add completion for help subcommand
- Date: Wed, 1 Dec 2010 19:44:29 -0500
- In-reply-to: <20100828005150.GB29397@xxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1282393263-16767-1-git-send-email-aaron@xxxxxxxxxx> <AANLkTimOcmpFpTrrVMsuvjCR8puCnhoRVsmduci=SP8d@xxxxxxxxxxxxxx> <20100827002003.GA8399@xxxxxxxxxxx> <AANLkTikK9VE0ToESknTwOVdWT+d-JqNhkveDY1bSf8Ym@xxxxxxxxxxxxxx> <20100827231832.GA29397@xxxxxxxxxxx> <AANLkTi=njjskXGJFzOTWRzBmU1Gd+gRUALBaGmZ9JHoE@xxxxxxxxxxxxxx> <20100828005150.GB29397@xxxxxxxxxxx>
At 20:51 -0400 27 Aug 2010, I wrote:
Revised, and hopefully final, version below.
It doesn't look like this has been committed to the repository yet. Is
there some further objection to it, or has it simply been overlooked?
From e87683251e5c5c5737a118031582ee4500bac4ee Mon Sep 17 00:00:00 2001
From: Aaron Schrab <aaron@xxxxxxxxxx>
Date: Thu, 19 Aug 2010 19:11:06 -0400
Subject: [PATCH] _git: Add completion for help subcommand
---
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..570d08f 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 () {
+ _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
--
1.7.0.4
Messages sorted by:
Reverse Date,
Date,
Thread,
Author