diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2005-02-25 14:09:25 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2005-02-25 14:09:25 +0000 |
commit | c7eb5a72f182af5caa04ed83c5b2b680884b7650 (patch) | |
tree | 0ee39d3698be96ebb3c211f89a8b48a0893af355 /Completion/Unix | |
parent | ddd172ebe2c625d4e894c66f511e803b50b20f78 (diff) | |
download | zsh-c7eb5a72f182af5caa04ed83c5b2b680884b7650.tar.gz zsh-c7eb5a72f182af5caa04ed83c5b2b680884b7650.tar.xz zsh-c7eb5a72f182af5caa04ed83c5b2b680884b7650.zip |
20867: handle imported files that are specified using a relative path
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | Completion/Unix/Command/_ant | 5 |
1 files changed, 3 insertions, 2 deletions
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/ *<import[^>]* file=[\"']\([^\"']*\)[\"'].*/\1/p" < $buildfile) ) - targets=( $(cat $buildfile $importedfiles | - sed -n "s/ *<target[^>]* name=[\"']\([^\"']*\)[\"'].*/\1/p" ) ) + targets=( $(sed -n "s/ *<target[^>]* name=[\"']\([^\"']*\)[\"'].*/\1/p" $buildfile) ) + (( $#importedfiles )) && targets+=( $(cd $buildfile:h; + sed -n "s/ *<target[^>]* name=[\"']\([^\"']*\)[\"'].*/\1/p" $importedfiles) ) _wanted targets expl target compadd -a targets && ret=0 else _message -e targets target |