From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24675 invoked from network); 31 Aug 2008 13:31:16 -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 Aug 2008 13:31:16 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 64216 invoked from network); 31 Aug 2008 13:31:09 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Aug 2008 13:31:09 -0000 Received: (qmail 18193 invoked by alias); 31 Aug 2008 13:31:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25569 Received: (qmail 18169 invoked from network); 31 Aug 2008 13:30:58 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 31 Aug 2008 13:30:58 -0000 Received: from mtaout01-winn.ispmail.ntl.com (mtaout01-winn.ispmail.ntl.com [81.103.221.47]) by bifrost.dotsrc.org (Postfix) with ESMTP id EED5A80561C3 for ; Sun, 31 Aug 2008 15:30:46 +0200 (CEST) Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080831133046.UMMA777.mtaout01-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com>; Sun, 31 Aug 2008 14:30:46 +0100 Received: from pws-pc ([81.107.43.40]) by aamtaout03-winn.ispmail.ntl.com with ESMTP id <20080831133046.LPGO29597.aamtaout03-winn.ispmail.ntl.com@pws-pc>; Sun, 31 Aug 2008 14:30:46 +0100 Date: Sun, 31 Aug 2008 14:30:37 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Cc: David LE BOURGEOIS Subject: Re: [zsh] ant completion broken Message-ID: <20080831143037.284bfcdf@pws-pc> In-Reply-To: <20080831092334.GA5600@dragon.maison> References: <20080831092334.GA5600@dragon.maison> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/8122/Sun Aug 31 03:04:56 2008 on bifrost X-Virus-Status: Clean On Sun, 31 Aug 2008 11:23:34 +0200 David LE BOURGEOIS wrote: > I wish to report a problem about zsh-4.3.6, concerning the _ant > completion file. The zsh-workers/24129 fix breaks the ant completion for > target name. > > In fact, the regular expression used in sed contains two spaces. And > since, in most of XML tags, the property separator is a single space, > the completion fails for many of build.xml files. > > As a fix, deleting one of the two spaces from the regular expression > makes the ant completion working again. Also, replacing the remaining > single space by the POSIX [[:blank:]] pattern might provide a safer > parsing of the target name. I'd prefer just deleting one of the spaces if that works OK, since zsh has historically worked with some pretty ancient versions of sed. I'm not sure this is necessary, just can't prove it isn't, so if the following works... Index: Completion/Unix/Command/_ant =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_ant,v retrieving revision 1.16 diff -u -r1.16 _ant --- Completion/Unix/Command/_ant 29 Nov 2007 09:49:43 -0000 1.16 +++ Completion/Unix/Command/_ant 31 Aug 2008 13:28:06 -0000 @@ -10,7 +10,7 @@ importedfiles=( $(sed -n "s/ *]* file=[\"']\([^\"']*\)[\"'].*/\1/p" < $1) ) # Tweaked to omit targets beginning with "-" that can't # be invoked from the command line; see zsh-workers/24129. - sed -n "s/ *]* name=[\"']\([^-][^\"']*\)[\"'].*/\1/p" $1 + sed -n "s/ *]* name=[\"']\([^-][^\"']*\)[\"'].*/\1/p" $1 if (( $#importedfiles )) ; then ( cd $1:h for file in $importedfiles ; do -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/