From 230872fa10ed0e9db8d1ca2818ce1a5b8a321928 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 24 Feb 2005 17:05:46 +0000 Subject: Konstantin Sobolev: 20832 (modified): gather targets from imported files --- Completion/Unix/Command/_ant | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_ant') diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant index 73d193991..184278662 100644 --- a/Completion/Unix/Command/_ant +++ b/Completion/Unix/Command/_ant @@ -2,6 +2,7 @@ typeset -A opt_args local buildfile tmp state line curcontext="$curcontext" ret=1 +local targets importedfiles local c target='*:target:->target' c=( $ANT_HOME/lib/*.jar ) @@ -86,7 +87,9 @@ case $state in buildfile=${(v)opt_args[(I)(-f|-file|-buildfile)]:-build.xml} fi if [[ -f $buildfile ]]; then - targets=( $(sed -n "s/ *]* name=[\"']\([^\"']*\)[\"'].*/\1/p" < $buildfile) ) + importedfiles=( $(sed -n "s/ *]* file=[\"']\([^\"']*\)[\"'].*/\1/p" < $buildfile) ) + targets=( $(cat $buildfile $importedfiles | + sed -n "s/ *]* name=[\"']\([^\"']*\)[\"'].*/\1/p" ) ) _wanted targets expl target compadd -a targets && ret=0 else _message -e targets target -- cgit 1.4.1