From cf87e2562c4ca2a49de36d68cd2c91a58ff02ada Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sat, 27 Jun 2009 20:22:48 +0000 Subject: 27061: Nicolas Lalevée: importing files into ant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Completion/Unix/Command/_ant | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Completion/Unix/Command') diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant index 91db1c162..8e4bd82af 100644 --- a/Completion/Unix/Command/_ant +++ b/Completion/Unix/Command/_ant @@ -12,10 +12,16 @@ find_targets() { # be invoked from the command line; see zsh-workers/24129. sed -n "s/ *]* name=[\"']\([^-][^\"']*\)[\"'].*/\1/p" $1 if (( $#importedfiles )) ; then - ( cd $1:h - for file in $importedfiles ; do - find_targets $file - done ) + ( cd $1:h + for file in $importedfiles ; do + expanded=( $(echo $file | sed -n "s|\${ant.home}|$ANT_HOME|p") ) + if [[ ! "bla$expanded" = "bla" ]]; then + file=$expanded + fi + if [[ -f $file ]]; then + find_targets $file + fi + done ) fi } -- cgit v1.2.3