From: Felix Rosencrantz <f_rosencrantz@yahoo.com>
To: zsh-workers <zsh-workers@sunsite.auc.dk>
Subject: PATCH: _java to arg completion for class arguments
Date: Thu, 5 Apr 2001 21:34:43 -0700 (PDT) [thread overview]
Message-ID: <20010406043443.33912.qmail@web10401.mail.yahoo.com> (raw)
[-- 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
reply other threads:[~2001-04-06 4:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010406043443.33912.qmail@web10401.mail.yahoo.com \
--to=f_rosencrantz@yahoo.com \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).