Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
patch for supporting <import>s in ant completion
- X-seq: zsh-workers 20832
- From: Konstantin Sobolev <konstantin.sobolev@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: patch for supporting <import>s in ant completion
- Date: Sat, 19 Feb 2005 15:57:00 +0300
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=KYif+WPE3+hj/Cpj91XWIJ9+qaauJtvSTH83XTjCh4C8iDPdXq8/pYG/HAId374ZsNwT1PykVR/ksvf5mM71Nnk8bmL/UPxZ/0sSWpO1umx1ma9XCnRqB/NjHsOUk0gc4MhUdxjXa8kiQAlWAHxfZOCKIRZB9qq6niTl3ho9W1k=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Reply-to: Konstantin Sobolev <konstantin.sobolev@xxxxxxxxx>
Hi,
I've patched ant completion to gather targets from imported files also
(http://ant.apache.org/manual/CoreTasks/import.html)
Though It doesn't expand properties, may be it will find it's place in
some of the future versions..
/usr/share/zsh/4.2.4/functions/Completion/Unix $ diff ant.orig _ant
89c89,93
< targets=( $(sed -n "s/ *<target[^>]*
name=[\"']\([^\"']*\)[\"'].*/\1/p" < $buildfile) )
---
> files=( $(sed -n "s/ *<import[^>]* file=[\"']\([^\"']*\)[\"'].*/\1/p" < $buildfile) $buildfile )
> targets=( )
> foreach file ( $files ) do
> targets=( $(sed -n "s/ *<target[^>]* name=[\"']\([^\"']*\)[\"'].*/\1/p" < $file) $targets )
> done
--
/KoS
Messages sorted by:
Reverse Date,
Date,
Thread,
Author