From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15563 invoked from network); 6 Apr 2001 04:34:53 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Apr 2001 04:34:53 -0000 Received: (qmail 23156 invoked by alias); 6 Apr 2001 04:34:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13914 Received: (qmail 23144 invoked from network); 6 Apr 2001 04:34:46 -0000 Message-ID: <20010406043443.33912.qmail@web10401.mail.yahoo.com> Date: Thu, 5 Apr 2001 21:34:43 -0700 (PDT) From: Felix Rosencrantz Subject: PATCH: _java to arg completion for class arguments To: zsh-workers MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-391555564-986531683=:31415" --0-391555564-986531683=:31415 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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/ --0-391555564-986531683=:31415 Content-Type: text/plain; name="java_diff.txt" Content-Description: java_diff.txt Content-Disposition: inline; filename="java_diff.txt" 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 --0-391555564-986531683=:31415--