summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command/_java
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_java')
-rw-r--r--Completion/Unix/Command/_java66
1 files changed, 48 insertions, 18 deletions
diff --git a/Completion/Unix/Command/_java b/Completion/Unix/Command/_java
index 7b1dce18f..2aef15a25 100644
--- a/Completion/Unix/Command/_java
+++ b/Completion/Unix/Command/_java
@@ -7,45 +7,76 @@ typeset -A opt_args tmpassoc
jdb_args=()
case "$service" in
+javac|jar)
+ if compset -P @; then
+ _wanted files expl 'option file' _files
+ return
+ fi
+ ;| # continue
javac)
_arguments -C \
'-g-[generate debugging information]:debug:->debug' \
+ '-A-[specify option to annotation processors]:option' \
+ '-implicit\:-[control generation of class files for implicitly loaded sources]:implicit:(class none)' \
'-nowarn[generate no warnings]' \
'-verbose[output messages about what the compiler is doing]' \
'-deprecation[output source locations where deprecated APIs are used]' \
- '-classpath[specify where to find user class files]:class path:->classpath' \
+ '(-cp -classpath)'{-cp,-classpath}'[specify where to find user class files]:class path:->classpath' \
'-sourcepath[specify where to find input source files]:source path:->sourcepath' \
'-bootclasspath[override location of bootstrap class files]:bootstrap class path:->bootstrapclasspath' \
'-extdirs[override location of installed extensions]:extensions directories:->extdirs' \
'-d[specify where to place generated class files]:directory:_files -/' \
'-encoding[specify character encoding used by source files]:encoding:->encoding' \
- '-source[provide source compatibility with specified release]:release:(1.{2..5})' \
+ '-proc\:-[control annotation processing]:annotation processing:(none only)' \
+ '-processor[specify annotation processors to run]:class:_files' \
+ '-processorpath[specify where to find annotation processors]:directory:_directories' \
+ '-s[specify directory for generated source files]:directory:_directories' \
+ '-source[provide source compatibility with specified release]:release:(1.{2..8} {5..8})' \
'-target[specify VM version]:release:(1.{1..5})' \
- '-help[print a synopsis of standard options]' \
+ '(-)-help[print a synopsis of standard options]' \
+ '(-)-version[print version information]' \
+ '(-)-X[display information about non-standard options]' \
'*:java source file:_files -g \*.java\(-.\)' && return 0
;;
jdb)
jdb_args=(
'-host[specify host to connect to]:host:_hosts'
- '-password[specify password]:password:'
+ '-password[specify password]:password'
+ '-attach[attach to running VM]:address'
+ '-listen[wait for VM to connect]:address'
+ '-listenany[wait for VM to connect at any available address]'
+ '-launch[launch VM immediately]'
+ '-listconnectors[list the connectors available in this VM]'
+ '-connect[connect to target VM]:connector'
+ -dbgtrace -tclient -tserver
+ '-J-[java runtime option]:option'
)
;&
java)
_arguments -C \
"$jdb_args[@]" \
+ -client -server -d32 -d64 \
+ '-agentlib\:-:agent library' \
+ '-agentpath\:-:path:_directories' \
+ '-javaagent\:-:path:_directories' \
'(-cp -classpath)'{-cp,-classpath}'[specify path for user class files]:class path:->classpath' \
'-D-[specify a property]:property:->property' \
+ \*{-enableassertions,-ea}-::class \
+ \*{-disableassertions,-da}-::class \
+ '(-enablesystemassertions,-esa,-disablesystemassertions,-dsa)'{-enablesystemassertions,-esa,-disablesystemassertions,-dsa} \
'(-verbose:class)-verbose[print class information]' \
'(-verbose)-verbose\:class[print class information]' \
'-verbose\:gc[print gc information]' \
'-verbose\:jni[print JNI information]' \
- '-version[print version]' \
- '-help[print help message]' \
- '(- 1)-jar[specify a program capsulated as jar]:jar:_files -g \*.jar\(-.\)' \
+ '(- 1)-version[print version]' \
+ '-showversion[print version and contrinue]' \
+ '(- 1)-'{\?,help}'[print help message]' \
+ '(- 1)-X-[non-standard java option]:option' \
+ '(- 1)-jar[specify a program encapsulated as jar]:jar:_files -g \*.jar\(-.\)' \
'(-):class:_java_class -m main ${(kv)opt_args[(i)(-classpath|-cp)]}' \
- '*::args: _normal' \
+ '*::args:= _normal' \
&& return 0
;;
@@ -111,16 +142,20 @@ jar)
'(c t x )u[update archive]' \
'f[specify archive file]' \
'v[verbose mode]' \
- 'm[specify manifest file]' \
+ '(e)m[specify manifest file]' \
+ '(m)e[specify class of for application entry point]' \
'0[store only without using ZIP compression]' \
- 'M[do not create manifest file]' && return
+ 'M[do not create manifest file]' \
+ 'i[generate index information for specified jar files]' && return
else
jar_cmd="${words[2]#-}"
tmpassoc=(
m ':manifest file:_files'
+ e ':main class'
f ':archive file:_files -g "*.([ejw]ar|zip)(-.)"'
)
- _arguments -C \