* [PATCH] ant completion
@ 2004-08-24 12:52 Jean-Baptiste Quenot
2004-08-24 20:58 ` Wayne Davison
0 siblings, 1 reply; 2+ messages in thread
From: Jean-Baptiste Quenot @ 2004-08-24 12:52 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 425 bytes --]
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/
[-- Attachment #2: zsh-ant-comp-patch --]
[-- Type: text/plain, Size: 492 bytes --]
--- _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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ant completion
2004-08-24 12:52 [PATCH] ant completion Jean-Baptiste Quenot
@ 2004-08-24 20:58 ` Wayne Davison
0 siblings, 0 replies; 2+ messages in thread
From: Wayne Davison @ 2004-08-24 20:58 UTC (permalink / raw)
To: Jean-Baptiste Quenot, zsh-workers
On Tue, Aug 24, 2004 at 02:52:27PM +0200, Jean-Baptiste Quenot wrote:
> 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.
Thanks -- I checked in your suggested change, though I did leave in the
space in front of the "name=" attribute, just for a little more paraoid
safety. I.e.:
...<target[^>]* name=...
..wayne..
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-24 21:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-24 12:52 [PATCH] ant completion Jean-Baptiste Quenot
2004-08-24 20:58 ` Wayne Davison
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).