From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5397 invoked from network); 29 Jan 2009 12:22:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Jan 2009 12:22:18 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 67907 invoked from network); 29 Jan 2009 12:22:09 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Jan 2009 12:22:09 -0000 Received: (qmail 9165 invoked by alias); 29 Jan 2009 12:21:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26468 Received: (qmail 9146 invoked from network); 29 Jan 2009 12:21:55 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 29 Jan 2009 12:21:55 -0000 Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by bifrost.dotsrc.org (Postfix) with ESMTPS id E29BA802720F for ; Thu, 29 Jan 2009 13:21:51 +0100 (CET) Received: from ingmar by bach.exherbo.org with local (Exim 4.69) (envelope-from ) id 1LSVu3-0000Kz-31; Thu, 29 Jan 2009 12:21:51 +0000 From: Ingmar Vanhassel To: Zsh Hackers' List Cc: Ingmar Vanhassel 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 Message-Id: <1233231710-1204-5-git-send-email-ingmar@exherbo.org> X-Mailer: git-send-email 1.6.0.1 In-Reply-To: <1233231710-1204-4-git-send-email-ingmar@exherbo.org> References: <1233231710-1204-1-git-send-email-ingmar@exherbo.org> <1233231710-1204-2-git-send-email-ingmar@exherbo.org> <1233231710-1204-3-git-send-email-ingmar@exherbo.org> <1233231710-1204-4-git-send-email-ingmar@exherbo.org> X-Virus-Scanned: ClamAV 0.92.1/8918/Thu Jan 29 12:42:19 2009 on bifrost X-Virus-Status: Clean --- 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