From abfa420189ab94720a73a81e163fa70bc8cbc096 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 7 Nov 2010 17:16:58 +0000 Subject: Mikael: 28389: empty section in java CLASSPATH --- ChangeLog | 7 ++++++- Completion/Unix/Type/_java_class | 5 +++-- 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 + + * Mikael: 28389: Completion/Unix/Type/_java_class: empty section + in $CLASSPATH. + 2010-11-03 Barton E. Schaefer * 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 -- cgit 1.4.1