about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Completion/Unix/Type/_java_class5
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index cd38639e7..d66552a59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-07  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* Mikael: 28389: Completion/Unix/Type/_java_class: empty section
+	in $CLASSPATH.
+
 2010-11-03  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 28384: Src/params.c: improve error message on assignment to a
@@ -13799,5 +13804,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5117 $
+* $Revision: 1.5118 $
 *****************************************************
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