From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1094 invoked from network); 8 Dec 2004 12:54:05 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Dec 2004 12:54:05 -0000 Received: (qmail 18980 invoked from network); 8 Dec 2004 12:53:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Dec 2004 12:53:59 -0000 Received: (qmail 5918 invoked by alias); 8 Dec 2004 12:53:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20607 Received: (qmail 5900 invoked from network); 8 Dec 2004 12:53:54 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Dec 2004 12:53:54 -0000 Received: (qmail 18508 invoked from network); 8 Dec 2004 12:52:57 -0000 Received: from grunt21.ihug.com.au (203.109.249.141) by a.mx.sunsite.dk with SMTP; 8 Dec 2004 12:52:52 -0000 Received: from 203-206-242-87.dyn.iinet.net.au (localhost.localdomain) [203.206.242.87] by grunt21.ihug.com.au with esmtp (Exim 3.35 #1 (Debian)) id 1Cc1JF-0003w5-00; Wed, 08 Dec 2004 23:52:45 +1100 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id iB8CqgDT016665; Wed, 8 Dec 2004 23:52:43 +1100 Received: (from doug@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id iB8CqePk016663; Wed, 8 Dec 2004 23:52:40 +1100 X-Authentication-Warning: localhost.localdomain: doug set sender to dougkearns@gmail.com using -f Date: Wed, 8 Dec 2004 23:52:40 +1100 From: Doug Kearns To: Jean-Baptiste Quenot , zsh-workers@sunsite.dk Subject: Re: [PATCH] Ant completion improvement Message-ID: <20041208125240.GG3924@localhost.localdomain> Mail-Followup-To: Jean-Baptiste Quenot , zsh-workers@sunsite.dk References: <20041206104117.GB1617@vision.anyware> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041206104117.GB1617@vision.anyware> User-Agent: Mutt/1.4i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hello Jean-Baptiste, On Mon, Dec 06, 2004 at 11:41:19AM +0100, Jean-Baptiste Quenot wrote: > Hello! > > Thanks for zsh: it's great. > > The example below does not return completion for the "build" target > without the patch (replace ^Is with tabs): > > ^I^I > > The example below does not return completion for the "build" target > without the patch: > > > > Please find attached a patch against 4.2.1 to allow ant completion to: Thanks. I was just about to commit this, but I'm not sure it's necessary. > 1) match leading tabs before the elements See below. > 2) match the target's "name" attribute not just on the first position It looks as though a variant of this has already been committed as a result of your patch posted to the list on 24/08/04. > Thanks in advance, > --- _ant.orig Mon Dec 6 11:22:13 2004 > +++ _ant Mon Dec 6 11:40:46 2004 > @@ -86,7 +86,7 @@ > buildfile=${(v)opt_args[(I)(-f|-file|-buildfile)]:-build.xml} > fi > if [[ -f $buildfile ]]; then > - targets=( $(sed -n "s/ * + targets=( $(sed -n "s/[ ]*]* name=[\"']\([^\"']*\)[\"'].*/\1/p" < $buildfile) ) Why not just: targets=( $(sed -n "s/ _wanted targets expl target compadd -a targets && ret=0 > else > _message -e targets target Regards, Doug