From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4436 invoked from network); 30 Aug 2008 21:35:46 -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; 30 Aug 2008 21:35:46 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 89464 invoked from network); 30 Aug 2008 21:35:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Aug 2008 21:35:27 -0000 Received: (qmail 23841 invoked by alias); 30 Aug 2008 21:35:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25561 Received: (qmail 23822 invoked from network); 30 Aug 2008 21:35:13 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 30 Aug 2008 21:35:13 -0000 Received: from mta-2.ms.rz.rwth-aachen.de (mta-2.ms.rz.RWTH-Aachen.DE [134.130.7.73]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 2C611801E2B4 for ; Sat, 30 Aug 2008 23:35:08 +0200 (CEST) Received: from ironport-out-2.rz.rwth-aachen.de ([134.130.3.59]) by mta-2.ms.rz.RWTH-Aachen.de (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0K6F004WSNYK3J70@mta-2.ms.rz.RWTH-Aachen.de> for zsh-workers@sunsite.dk; Sat, 30 Aug 2008 23:35:08 +0200 (CEST) Received: from relay.rwth-aachen.de ([134.130.3.1]) by ironport-in-2.rz.rwth-aachen.de with ESMTP; Sat, 30 Aug 2008 23:35:08 +0200 Received: from fsst.voodoo.lan ([212.117.84.147]) by relay.rwth-aachen.de (8.13.7/8.13.3/1) with ESMTP id m7ULZ7Qx004024 for ; Sat, 30 Aug 2008 23:35:07 +0200 (MEST) Received: from hawk by fsst.voodoo.lan with local (Exim 4.69) (envelope-from ) id 1KZY5A-0002kC-3a for zsh-workers@sunsite.dk; Sat, 30 Aug 2008 23:34:08 +0200 Date: Sat, 30 Aug 2008 23:34:08 +0200 From: Frank Terbeck Subject: PATCH: Fix a bug in completion for 'git aliases' To: zsh workers Mail-followup-to: zsh workers Message-id: <20080830213408.GT6330@fsst.voodoo.lan> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Content-disposition: inline X-IronPort-AV: E=Sophos;i="4.32,299,1217800800"; d="scan'208";a="53387983" User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV 0.92.1/8120/Sat Aug 30 05:43:49 2008 on bifrost X-Virus-Status: Clean Consider you got this: [alias] co = checkout And try: git co ...everything looks fine; but then you try: git co -b ...which should work, too (by displaying a descriptive text: "branch-name"), but it does not. The reason for this is too much quoting. This should be the right fix. Index: Completion/Unix/Command/_git =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v retrieving revision 1.93 diff -u -r1.93 _git --- Completion/Unix/Command/_git 30 Aug 2008 11:36:54 -0000 1.93 +++ Completion/Unix/Command/_git 30 Aug 2008 20:38:48 -0000 @@ -4290,7 +4290,7 @@ if [[ -z "${words[3,-1]}" ]] ; then tmpwords[$(( ${#tmpwords} + 1 ))]="" else - tmpwords+=("${words[3,-1]}") + tmpwords+=(${words[3,-1]}) fi words=("${tmpwords[@]}") (( CURRENT += ${#${(z)git_aliases[$words[2]]}} - 1 ))