1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

Add completion for help subcommand to _git.

This commit is contained in:
Wayne Davison 2010-12-04 18:08:12 +00:00
parent e5ddd5b62f
commit ddee5deb2d
2 changed files with 21 additions and 2 deletions

View file

@ -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 $
*****************************************************

View file

@ -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