From c7eb5a72f182af5caa04ed83c5b2b680884b7650 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Fri, 25 Feb 2005 14:09:25 +0000 Subject: 20867: handle imported files that are specified using a relative path --- Completion/Unix/Command/_ant | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant index 184278662..6ef0e733d 100644 --- a/Completion/Unix/Command/_ant +++ b/Completion/Unix/Command/_ant @@ -88,8 +88,9 @@ case $state in fi if [[ -f $buildfile ]]; then importedfiles=( $(sed -n "s/ *]* file=[\"']\([^\"']*\)[\"'].*/\1/p" < $buildfile) ) - targets=( $(cat $buildfile $importedfiles | - sed -n "s/ *]* name=[\"']\([^\"']*\)[\"'].*/\1/p" ) ) + targets=( $(sed -n "s/ *]* name=[\"']\([^\"']*\)[\"'].*/\1/p" $buildfile) ) + (( $#importedfiles )) && targets+=( $(cd $buildfile:h; + sed -n "s/ *]* name=[\"']\([^\"']*\)[\"'].*/\1/p" $importedfiles) ) _wanted targets expl target compadd -a targets && ret=0 else _message -e targets target -- cgit 1.4.1