From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1731 invoked from network); 31 Mar 2009 16:05:05 -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=AWL,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; 31 Mar 2009 16:05:04 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 21427 invoked from network); 31 Mar 2009 16:04:55 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Mar 2009 16:04:55 -0000 Received: (qmail 22442 invoked by alias); 31 Mar 2009 16:04:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26798 Received: (qmail 22428 invoked from network); 31 Mar 2009 16:04:50 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 31 Mar 2009 16:04:50 -0000 Received: from zucker.schokokeks.org (zucker.schokokeks.org [78.46.69.5]) by bifrost.dotsrc.org (Postfix) with ESMTPS id B3DE28026E27 for ; Tue, 31 Mar 2009 18:04:45 +0200 (CEST) Received: from localhost (p5494F1E7.dip.t-dialin.net [::ffff:84.148.241.231]) (AUTH: PLAIN simon@ruderich.org, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by zucker.schokokeks.org with esmtp; Tue, 31 Mar 2009 18:04:44 +0200 id 000000000001800D.0000000049D23F1C.00002DFB Date: Tue, 31 Mar 2009 18:04:47 +0200 From: Simon Ruderich To: zsh-workers@sunsite.dk Subject: [PATCH] git add -p file completion Message-ID: <20090331160447.GA29762@ruderich.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Transfer-Encoding: 7bit Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV 0.92.1/9187/Tue Mar 31 17:28:21 2009 on bifrost X-Virus-Status: Clean -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I found a minor bug in _git completion. It doesn't allow file completions after `git add -p` which works fine with git. The following patch fixes this. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 8c414b8..91607d3 100644 - --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -1331,7 +1332,7 @@ _git-add () { '(-v --verbose)'{-v,--verbose}'[show files as they are added]' \ '(-f --force)'{-f,--force}'[allow adding otherwise ignored files]' \ '(-i --interactive : -)'{-i,--interactive}'[add contents interactively to the index]' \ - - '(-p --patch : -)'{-p,--patch}'[like -i but go directly into patch mode for specified files]' \ + '(-p --patch)'{-p,--patch}'[like -i but go directly into patch mode for specified files]' \ '(-u --update)'{-u,--update}'[update only files git already knows about]' \ '(-A --all)'{-A,--all}'[act as both add . and add -u]' \ '(-N --intent-to-add)'{-N,--intent-to-add}'[record only that the path will be added later]' \ By the way, is the usage of : - documented somewhere in the completion man page? I couldn't find it. Thanks, Simon - -- + privacy is necessary + using http://gnupg.org + public key id: 0x6115F804EFB33229 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAknSPx8ACgkQYRX4BO+zMik57QCfehWFannV0in/UuoGzLzlrEcd tqYAoKmCLpZB3GSFR9HyLRtvKLiUyFTn =zYYM -----END PGP SIGNATURE-----