From: Ingmar Vanhassel <ingmar@exherbo.org>
To: Zsh Hackers' List <zsh-workers@sunsite.dk>
Cc: Ingmar Vanhassel <ingmar@exherbo.org>
Subject: [PATCH] "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached.
Date: Thu, 29 Jan 2009 12:21:46 +0000 [thread overview]
Message-ID: <1233231710-1204-5-git-send-email-ingmar@exherbo.org> (raw)
In-Reply-To: <1233231710-1204-4-git-send-email-ingmar@exherbo.org>
---
Completion/Unix/Command/_git | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 79c08f6..209fb97 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'
@@ -1351,6 +1352,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 \
@@ -1658,7 +1664,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' \
--
1.6.0.1
next prev parent reply other threads:[~2009-01-29 12:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-29 12:21 [PATCH] Updates to git completion Ingmar Vanhassel
2009-01-29 12:21 ` [PATCH] Add "git remote rename" completion Ingmar Vanhassel
2009-01-29 12:21 ` [PATCH] Add "git describe --tags" completion. Fix typos Ingmar Vanhassel
2009-01-29 12:21 ` [PATCH] Complete "git add --intent-to-add" Ingmar Vanhassel
2009-01-29 12:21 ` Ingmar Vanhassel [this message]
2009-01-29 12:21 ` [PATCH] Complete "git clone --verbose" Ingmar Vanhassel
2009-01-29 12:21 ` [PATCH] Complete "git commit --cleanup=" and "git commit --allow-empty" Ingmar Vanhassel
2009-01-29 12:21 ` [PATCH] Update "git rebase" completions Ingmar Vanhassel
2009-01-29 12:21 ` [PATCH] Update "git svn" completion Ingmar Vanhassel
2009-01-29 14:33 ` [PATCH] "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached Richard Hartmann
2009-01-29 14:36 ` [PATCH] Updates to git completion Richard Hartmann
2009-01-29 14:40 ` Mikael Magnusson
2009-01-29 15:07 ` Richard Hartmann
2009-01-29 15:18 ` Nikolai Weibull
2009-02-02 14:48 ` Allan Caffee
2009-02-03 10:44 ` Doug Kearns
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1233231710-1204-5-git-send-email-ingmar@exherbo.org \
--to=ingmar@exherbo.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).