From 5440b945dd3037e48c2b1da8d067460c98053205 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Fri, 9 Aug 2002 15:28:24 +0000 Subject: 17521: new completion for ant --- Completion/Unix/Command/.distfiles | 2 +- Completion/Unix/Command/_ant | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Completion/Unix/Command/_ant (limited to 'Completion/Unix/Command') diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles index 33e1023e3..76c8cf8e1 100644 --- a/Completion/Unix/Command/.distfiles +++ b/Completion/Unix/Command/.distfiles @@ -18,5 +18,5 @@ _last _loadkeys _modutils _ruby _sysctl _links _samba _user_admin _rsync _arping _spamassassin _mtools _ifconfig _fsh _chkconfig _cdcd _irssi _mysqldiff _sccs _netcat _larch _valgrind _texinfo _figlet -_global _global_tags +_global _global_tags _ant ' diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant new file mode 100644 index 000000000..c1baf6f69 --- /dev/null +++ b/Completion/Unix/Command/_ant @@ -0,0 +1,38 @@ +#compdef ant -value-,ANT_ARGS,-default- + +typeset -A opt_args +local state line curcontext="$curcontext" +local target='*:target:->target' + +if [[ $service = *ANT_ARGS* ]]; then + compset -q + words=( fake "$words[@]" ) + (( CURRENT++ )) + unset target +fi + +_arguments -C \ + '-help[display usage information]' \ + '-projecthelp[print project hjelp information]' \ + '-version[display version information]' \ + '-diagnostics[display info useful to problem diagnosis]' \ + '(-q -quiet)'{-q,-quiet}'[be extra quiet]' \ + '(-v -verbose)'{-v,-verbose}'[be more verbose]' \ + '-debug[print debugging information]' \ + '-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' \ + '-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' \ + $target && return + +if [[ -n $state ]]; then + targets=( $(sed -n 's/ *