From: Doug Kearns <dougkearns@gmail.com>
To: Jean-Baptiste Quenot <jb.quenot@caraldi.com>, zsh-workers@sunsite.dk
Subject: Re: [PATCH] Ant completion improvement
Date: Wed, 8 Dec 2004 23:52:40 +1100 [thread overview]
Message-ID: <20041208125240.GG3924@localhost.localdomain> (raw)
In-Reply-To: <20041206104117.GB1617@vision.anyware>
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<target name="build" depends="init">
>
> The example below does not return completion for the "build" target
> without the patch:
>
> <target depends="init" name="build">
>
> 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 <target/> 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/ *<target name=[\"']\([^\"']*\)[\"'].*/\1/p" < $buildfile) )
> + targets=( $(sed -n "s/[ ]*<target *[^>]* name=[\"']\([^\"']*\)[\"'].*/\1/p" < $buildfile) )
Why not just:
targets=( $(sed -n "s/<target name=[\"']\([^\"']*\)[\"'].*/\1/p" < $buildfile) )
Either way I don't see why this would fail with leading tabs. What am I
missing?
> _wanted targets expl target compadd -a targets && ret=0
> else
> _message -e targets target
Regards,
Doug
next prev parent reply other threads:[~2004-12-08 12:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-06 10:41 Jean-Baptiste Quenot
2004-12-06 11:07 ` Doug Kearns
2004-12-08 12:52 ` Doug Kearns [this message]
2004-12-08 13:33 ` Jean-Baptiste Quenot
2004-12-08 13:57 ` Doug Kearns
2004-12-08 14:07 ` Jean-Baptiste Quenot
2004-12-08 14:28 ` Doug Kearns
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041208125240.GG3924@localhost.localdomain \
--to=dougkearns@gmail.com \
--cc=jb.quenot@caraldi.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).