about summary refs log tree commit diff
path: root/Completion/Unix/Command/_ant
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-07-02 10:25:05 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-07-02 10:25:05 +0000
commit1cb11615aa337d98022a48c1c3c8c5c33b0b57c2 (patch)
tree666f075271d340fabcc63b564e1c296aa3715f9e /Completion/Unix/Command/_ant
parentbedc4995d225195a2e48c0d9430ceb97adfb7e2f (diff)
downloadzsh-1cb11615aa337d98022a48c1c3c8c5c33b0b57c2.tar.gz
zsh-1cb11615aa337d98022a48c1c3c8c5c33b0b57c2.tar.xz
zsh-1cb11615aa337d98022a48c1c3c8c5c33b0b57c2.zip
merge changes back from 4.1
Diffstat (limited to 'Completion/Unix/Command/_ant')
-rw-r--r--Completion/Unix/Command/_ant8
1 files changed, 5 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant
index 473fdf33c..e81fbfc02 100644
--- a/Completion/Unix/Command/_ant
+++ b/Completion/Unix/Command/_ant
@@ -1,7 +1,7 @@
 #compdef ant
 
 typeset -A opt_args
-local state line curcontext="$curcontext"
+local state line curcontext="$curcontext" ret=1
 local target='*:target:->target'
 
 _arguments -C \
@@ -21,11 +21,13 @@ _arguments -C \
   '-propertyfile[load properties from specified file]:property file:_files' \
   '-inputhandler[specify class which will handle input requests]:class:_java_class' \
   '-find[search for buildfile]:file:_files' \
-  $target && return
+  $target && ret=0
 
 if [[ -n $state ]]; then
   targets=( $(sed -n 's/ *<target name="\([^"]*\)".*/\1/p' < build.xml) )
   # ant can be used to get a list of targets for us like this but it is slow
   # targets=( ${${(M)${(f)"$(_call_program targets $words[1] -projecthelp)"}:# *}# } )
-  _wanted targets expl target compadd -a targets
+  _wanted targets expl target compadd -a targets && ret=0
 fi
+
+return ret