summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Completion/Unix/Command/_ant14
2 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b25b778e..eac7622c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-27  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 27061: Nicolas Lalevée: Completion/Unix/Command/_ant:
+	importing files into ant.
+
 2009-06-26  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* Greg Klanderman: 27057: Src/utils.c: %e and %f time formats
@@ -11860,5 +11865,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4718 $
+* $Revision: 1.4719 $
 *****************************************************
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/ *<target[^>]* 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
 }