about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Type/_java_class5
1 files changed, 3 insertions, 2 deletions
diff --git a/Completion/Unix/Type/_java_class b/Completion/Unix/Type/_java_class
index d81669c00..020128823 100644
--- a/Completion/Unix/Type/_java_class
+++ b/Completion/Unix/Type/_java_class
@@ -13,9 +13,10 @@ classpath="${${classpath[2]:-${CLASSPATH:-.}}//\\:/:}"
 : "$classpath[@]"
 
 for i in "${(s.:.)classpath}"; do
-  if [ -f $i ] && [[ "$i" == *.(jar|zip|war|ear) ]]; then
+  [[ -z $i ]] && i=.
+  if [[ -f $i ]] && [[ "$i" == *.(jar|zip|war|ear) ]]; then
     c+=( ${${${(M)$(_call_program jar_classes jar -tf $i)##*.class}%%.class}:gs#/#.#} )
-  elif [ -d $i ]; then
+  elif [[ -d $i ]]; then
     c+=( $i/**/*.class(.:r:s/.class//:s#$i/##:gs#/#.#) )
   fi
 done