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

patch for supporting <import>s in ant completion



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