about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-06-27 20:22:48 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-06-27 20:22:48 +0000
commitcf87e2562c4ca2a49de36d68cd2c91a58ff02ada (patch)
tree54b810bef20f01e1adba5e4d3590c5a2d4ace517
parent506c845b25be0fa9aff60fd4b8e0a3e96523ec25 (diff)
downloadzsh-cf87e2562c4ca2a49de36d68cd2c91a58ff02ada.tar.gz
zsh-cf87e2562c4ca2a49de36d68cd2c91a58ff02ada.tar.xz
zsh-cf87e2562c4ca2a49de36d68cd2c91a58ff02ada.zip
27061: Nicolas Lalevée: importing files into ant
-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
 }