summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2009-01-29 17:37:48 +0000
committerClint Adams <clint@users.sourceforge.net>2009-01-29 17:37:48 +0000
commitf958e846e415f5609a709635ce1dff7bd4120aef (patch)
treee9d1bac687054ead6bf5649fef7ac22f3263f30c /Completion/Unix
parent4ddc411d719845af612980ae756b2b92f026f42f (diff)
downloadzsh-f958e846e415f5609a709635ce1dff7bd4120aef.tar.gz
zsh-f958e846e415f5609a709635ce1dff7bd4120aef.tar.xz
zsh-f958e846e415f5609a709635ce1dff7bd4120aef.zip
Ingmar Vanhassel: 26468: "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached.
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_git8
1 files changed, 7 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 7e6a17439..6e930df98 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -178,6 +178,7 @@ _git_commands () {
     'revert:revert existing commit'
     'rm:remove files from the working tree and from the index'
     'show-branch:show branches and their commits'
+    'stage:add file contents to the staging area'
     'stash:stash away changes to the working tree'
     'status:show working-tree'\''s status'
     '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
 
+(( $+functions[_git-stage] )) ||
+_git-stage () {
+  _git-add
+}
+
 (( $+functions[_git-am] )) ||
 _git-am () {
   _arguments \
@@ -1656,7 +1662,7 @@ __git_zstyle_default ':completion::complete:git-commit:argument-rest:*' ignore-l
 _git-diff () {
   _arguments -S \
     $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' \
     '::original revision:__git_objects' \
     '::new revision:__git_objects' \