diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2009-06-27 20:22:48 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-06-27 20:22:48 +0000 |
commit | cf87e2562c4ca2a49de36d68cd2c91a58ff02ada (patch) | |
tree | 54b810bef20f01e1adba5e4d3590c5a2d4ace517 /Completion | |
parent | 506c845b25be0fa9aff60fd4b8e0a3e96523ec25 (diff) | |
download | zsh-cf87e2562c4ca2a49de36d68cd2c91a58ff02ada.tar.gz zsh-cf87e2562c4ca2a49de36d68cd2c91a58ff02ada.tar.xz zsh-cf87e2562c4ca2a49de36d68cd2c91a58ff02ada.zip |
27061: Nicolas Lalevée: importing files into ant
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Unix/Command/_ant | 14 |
1 files changed, 10 insertions, 4 deletions
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 } |