Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] ant completion
- X-seq: zsh-workers 20283
- From: Jean-Baptiste Quenot <jb.quenot@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: [PATCH] ant completion
- Date: Tue, 24 Aug 2004 14:52:27 +0200
- Mail-followup-to: Jean-Baptiste Quenot <jb.quenot@xxxxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Dear workers,
Please find attached a patch for ant completion. The current
ant completion script only works when the "name" attribute
immediately follows the "target" element name.
In the following example, zsh only offers completion for the
'othertarget' target:
<target name='othertarget'/>
<target depends='othertarget' name='mytarget'/>
Best regards,
--
Jean-Baptiste Quenot
http://caraldi.com/jbq/
--- _ant.orig Tue Aug 24 14:40:26 2004
+++ _ant Tue Aug 24 14:51:38 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) )
_wanted targets expl target compadd -a targets && ret=0
else
_message -e targets target
Messages sorted by:
Reverse Date,
Date,
Thread,
Author