From 664395e56f162e15336abd386e1f0f7dc9dc0c11 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 19 Aug 2002 14:54:13 +0000 Subject: users/5266: with the call-command style parse ant -projecthelp to get targets --- Completion/Unix/Command/_ant | 79 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 68 insertions(+), 11 deletions(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant index c1baf6f69..717fa9ea4 100644 --- a/Completion/Unix/Command/_ant +++ b/Completion/Unix/Command/_ant @@ -1,8 +1,9 @@ #compdef ant -value-,ANT_ARGS,-default- typeset -A opt_args -local state line curcontext="$curcontext" +local buildfile tmp state line curcontext="$curcontext" local target='*:target:->target' +#local CLASSPATH="$ANT_HOME/lib/*.jar" if [[ $service = *ANT_ARGS* ]]; then compset -q @@ -22,17 +23,73 @@ _arguments -C \ '-emacs[produce logging information without adornments]' \ '(-l -logfile)'{-l,-logfile}'[use specified file for log]:logfile:_files' \ '-logger[the class which is to perform logging]:classname:_java_class' \ - '-listener[add an instance of class as a project listener]:classname:_java_class' \ - '(-f -file -buildfile)'{-f,-file,-buildfile}'[use specified build file]:build file:_files' \ - '*-D[specify property with value to use]:property' \ + '*-listener[add an instance of class as a project listener]:classname:_java_class' \ + '(-f -file -buildfile -find)'{-f,-file,-buildfile}'[use specified build file]:build file:_files' \ + '*-D[specify property with value to use]:property:->property' \ '-propertyfile[load properties from specfied file]:property file:_files' \ '-inputhandler[specify class which will handle input requests]:class:_java_class' \ - '-find[search for buildfile]:file:_files' \ + '(-f -file -buildfile)-find[search for build file towards the root of filesystem]:build file:(build.xml)' \ $target && return -if [[ -n $state ]]; then - targets=( $(sed -n 's/ *