Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _java to arg completion for class arguments

This is a small patch that adds 2 features to the _java completer.
1. For the java command, this adds a call to _normal after specifying the class
to run for java.  This makes it possible to write completion functions for java
classes.  This was inspired by Bart's change in zsh-workers/13599 for _sh.

2. For the jar command, if the user specifies the -x flag to extract files, the
completion function now allows the user to complete files file the jar.


Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
Index: _java
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_java,v
retrieving revision 1.1
diff -r1.1 _java
< local curcontext="$curcontext" state line
> local curcontext="$curcontext" state line jf
<     '*:arguments:_default' && return 0
>     '*::args: _normal' \
>      && return 0
>   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

Messages sorted by: Reverse Date, Date, Thread, Author