Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _java to arg completion for class arguments
- X-seq: zsh-workers 13914
- From: Felix Rosencrantz <f_rosencrantz@xxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxxxxxx>
- Subject: PATCH: _java to arg completion for class arguments
- Date: Thu, 5 Apr 2001 21:34:43 -0700 (PDT)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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.
-FR.
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
Index: _java
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_java,v
retrieving revision 1.1
diff -r1.1 _java
4c4
< local curcontext="$curcontext" state line
---
> local curcontext="$curcontext" state line jf
48c48,49
< '*:arguments:_default' && return 0
---
> '*::args: _normal' \
> && return 0
528a530,537
> 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