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-06-25 09:03:04 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-06-25 09:03:04 +0000
commita267832ddf4150652fde3936858841bb2edbd9ae (patch)
tree961f0cbcaf8dbdaf2ff2e1a5409d644158f592bf /Completion/Unix/Command/_ant
parentdd54fb249881fa882319cd2642780dcebb8d9f7c (diff)
downloadzsh-a267832ddf4150652fde3936858841bb2edbd9ae.tar.gz
zsh-a267832ddf4150652fde3936858841bb2edbd9ae.tar.xz
zsh-a267832ddf4150652fde3936858841bb2edbd9ae.zip
18631: returning too early breaks prefix-needed style set to false
Diffstat (limited to 'Completion/Unix/Command/_ant')
-rw-r--r--Completion/Unix/Command/_ant10
1 files changed, 6 insertions, 4 deletions
diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant
index ff973b37f..88c1f3ef4 100644
--- a/Completion/Unix/Command/_ant
+++ b/Completion/Unix/Command/_ant
@@ -1,7 +1,7 @@
 #compdef ant -value-,ANT_ARGS,-default-
 
 typeset -A opt_args
-local buildfile tmp state line curcontext="$curcontext"
+local buildfile tmp state line curcontext="$curcontext" ret=1
 local c target='*:target:->target'
 
 c=( $ANT_HOME/lib/*.jar )
@@ -30,7 +30,7 @@ _arguments -C \
   '-propertyfile[load properties from specified file]:property file:_files' \
   '-inputhandler[specify class which will handle input requests]:class:_java_class -cp ${(j.\:.)c}' \
   '(-f -file -buildfile)-find[search for build file towards the root of filesystem]:build file:(build.xml)' \
-  $target && return
+  $target && ret=0
 
 case $state in
   property)
@@ -78,7 +78,7 @@ case $state in
           esac
 	done
       )//$'\015'}"
-      _describe 'target' tmp
+      _describe 'target' tmp && ret=0
     else
       if [[ -n $opt_args[-find] ]]; then
 	buildfile=( (../)#${opt_args[-find]:-build.xml}(N[-1]) )
@@ -87,10 +87,12 @@ case $state in
       fi
       if [[ -f $buildfile ]]; then
 	targets=( $(sed -n 's/ *<target name="\([^"]*\)".*/\1/p' < $buildfile) )
-	_wanted targets expl target compadd -a targets
+	_wanted targets expl target compadd -a targets && ret=0
       else
 	_message -e targets target
       fi
     fi
   ;;
 esac
+
+return ret