about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-11-07 17:16:58 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-11-07 17:16:58 +0000
commitabfa420189ab94720a73a81e163fa70bc8cbc096 (patch)
tree7d51a2ab6926017aed07e9aaa31e6a488427586b
parentad56692b16c3a56236853816ddf38e14de034349 (diff)
downloadzsh-abfa420189ab94720a73a81e163fa70bc8cbc096.tar.gz
zsh-abfa420189ab94720a73a81e163fa70bc8cbc096.tar.xz
zsh-abfa420189ab94720a73a81e163fa70bc8cbc096.zip
Mikael: 28389: empty section in java CLASSPATH
-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