Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Ant completion improvement



* Doug Kearns:
> > 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.

OK I understand now, you mean it's committed but not in zsh 4.2.1?
I will try to get the latest zsh from CVS.

> 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?

No it doesn't fail with leading tabs, it's just a « cosmetic »
cleanup.

Sorry for posting this patch a second time, I didn't remember the
patch submitted Tue, 24 Aug 2004 as I use zsh 4.2.1.

Just a note, I would replace:

<target[^>]*

With:

<target *[^>]*

Just to be sure that we don't match <targetfoobar ...

Sorry for the noise,
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/



Messages sorted by: Reverse Date, Date, Thread, Author