* PATCH: _java to arg completion for class arguments
@ 2001-04-06 4:34 Felix Rosencrantz
0 siblings, 0 replies; only message in thread
From: Felix Rosencrantz @ 2001-04-06 4:34 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 607 bytes --]
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/
[-- Attachment #2: java_diff.txt --]
[-- Type: text/plain, Size: 704 bytes --]
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-04-06 4:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-06 4:34 PATCH: _java to arg completion for class arguments Felix Rosencrantz
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).