about summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorFelix Rosencrantz <f_rosencrantz@users.sourceforge.net>2001-04-06 04:36:48 +0000
committerFelix Rosencrantz <f_rosencrantz@users.sourceforge.net>2001-04-06 04:36:48 +0000
commit7bc02e1b7401b90ee9e1b95f19907eec3a13ab3d (patch)
treef60664038e5de20f4c364048375d6abaa24f3aad /Completion/Unix/Command
parent24babae806bc180e24ddd1118df81dbfc47eba1a (diff)
downloadzsh-7bc02e1b7401b90ee9e1b95f19907eec3a13ab3d.tar.gz
zsh-7bc02e1b7401b90ee9e1b95f19907eec3a13ab3d.tar.xz
zsh-7bc02e1b7401b90ee9e1b95f19907eec3a13ab3d.zip
workers/13914: Added call to _normal after specified class name, and added completion of filenames in jar archive after -x flag
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_java13
1 files changed, 11 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_java b/Completion/Unix/Command/_java
index becfbe4c2..5da232231 100644
--- a/Completion/Unix/Command/_java
+++ b/Completion/Unix/Command/_java
@@ -1,7 +1,7 @@
 #compdef javac java javadoc appletviewer jar jdb javah javap extcheck rmic rmiregistry rmid serialvar native2ascii keytool jarsigner policytool
 
 local expl tmp jdb_args jar_cmd match basedir
-local curcontext="$curcontext" state line
+local curcontext="$curcontext" state line jf
 typeset -A opt_args tmpassoc
 
 jdb_args=()
@@ -45,7 +45,8 @@ java)
     '-help[print help message]' \
     '(- 1)-jar[specify a program capsulated as jar]:jar:_files -g \*.jar' \
     '(-):class:->class' \
-    '*:arguments:_default' && return 0
+    '*::args: _normal' \
+     && return 0
   ;;
 
 javadoc)
@@ -526,6 +527,14 @@ jararg)
     _wanted file expl 'input file' _files -W "($words[CURRENT - 1])"
   elif [[ "$words[CURRENT - 1]" == -C ]]; then
     _wanted directories expl 'chdir to' _files -/
+  elif [[ $words[2] = *x* ]]; then
+        jf="$words[3]"
+        if [[ $jf != $_jar_cache_name && -f $jf ]]; then
+            _jar_cache_list=("${(@f)$($words[1] tf $jf)}")
+            _jar_cache_name=$jf
+        fi
+
+        _wanted files expl 'file from archive' _multi_parts / _jar_cache_list
   else
     _wanted files expl 'input file' _files
   fi