1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-10 12:40:58 +02:00

Ingmar Vanhassel: 26468: "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached.

This commit is contained in:
Clint Adams 2009-01-29 17:37:48 +00:00
parent 4ddc411d71
commit f958e846e4
2 changed files with 11 additions and 2 deletions

View file

@ -16,6 +16,9 @@
modinfo -k. modinfo -k.
* Ingmar Vanhassel: 26467: Completion/Unix/Command/_git: add "git * Ingmar Vanhassel: 26467: Completion/Unix/Command/_git: add "git
remote rename" completion. remote rename" completion.
* Ingmar Vanhassel: 26468: Completion/Unix/Command/_git: "git
stage" is now a synonym for "git add". git diff: --staged is a
synonym for --cached.
2009-01-29 Peter Stephenson <pws@csr.com> 2009-01-29 Peter Stephenson <pws@csr.com>
@ -11047,5 +11050,5 @@
***************************************************** *****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL * This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.4537 $ * $Revision: 1.4538 $
***************************************************** *****************************************************

View file

@ -178,6 +178,7 @@ _git_commands () {
'revert:revert existing commit' 'revert:revert existing commit'
'rm:remove files from the working tree and from the index' 'rm:remove files from the working tree and from the index'
'show-branch:show branches and their commits' 'show-branch:show branches and their commits'
'stage:add file contents to the staging area'
'stash:stash away changes to the working tree' 'stash:stash away changes to the working tree'
'status:show working-tree'\''s status' 'status:show working-tree'\''s status'
'tag:create tag object signed with GPG' 'tag:create tag object signed with GPG'
@ -1349,6 +1350,11 @@ _git-add () {
} }
__git_zstyle_default ':completion::complete:git-add:argument-rest:*' ignore-line yes __git_zstyle_default ':completion::complete:git-add:argument-rest:*' ignore-line yes
(( $+functions[_git-stage] )) ||
_git-stage () {
_git-add
}
(( $+functions[_git-am] )) || (( $+functions[_git-am] )) ||
_git-am () { _git-am () {
_arguments \ _arguments \
@ -1656,7 +1662,7 @@ __git_zstyle_default ':completion::complete:git-commit:argument-rest:*' ignore-l
_git-diff () { _git-diff () {
_arguments -S \ _arguments -S \
$diff_args \ $diff_args \
'--cached[show diff between index and named commit]' \ '(--cached --staged)'{--cached,--staged}'[show diff between index and named commit]' \
'::commit range:__git_commit_ranges' \ '::commit range:__git_commit_ranges' \
'::original revision:__git_objects' \ '::original revision:__git_objects' \
'::new revision:__git_objects' \ '::new revision:__git_objects' \