From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6690 invoked from network); 20 Aug 2002 19:42:04 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 20 Aug 2002 19:42:04 -0000 Received: (qmail 1572 invoked by alias); 20 Aug 2002 19:41:43 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5272 Received: (qmail 1558 invoked from network); 20 Aug 2002 19:41:42 -0000 Message-ID: <20020820194141.9912.qmail@web10410.mail.yahoo.com> Date: Tue, 20 Aug 2002 12:41:41 -0700 (PDT) From: Felix Rosencrantz Subject: Re: [SUBMIT] _ant completion function To: Oliver Kiddle Cc: Bill Burton , Zsh users In-Reply-To: <20020820103224.GA22728@logica.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii --- Oliver Kiddle wrote: > In the latter half, after determining that $i is a directory, why does it > then ignore $i when putting together a list based on .class files? Seems > strange to me. Yes is a bug, it should be looking for class files under $i. > Can a classpath contain things like '*.jar' or for _ant should it be > expanding the glob. Classpath can not contain globs as far as I know. > There is a better way. Have a look in _figlet for an example. Basically > you can use an _arguments spec which looks something like this: > '*:class:_java_class -cp ${(v)~opt_args[(i)(-cp|-classpath)]\:-$CLASSPATH}' > so no states are needed. > > It'd be cleaner if _java_class just had an argument to specify the > classpath like this. That's better (and correct). Though it is not compact, not sure what can be done about that. > > Also, adding caching for the build.xml targets/descriptions, and > > for _java_class jar files. > > For cacheing the contents of jar files, it might be wise to use the same > cache used by _zip and allow jar completion to also use it. I'm not quite sure I understand exactly how that would work. The _zip cache assumes that there is a single zip file that is being cached. It seems like the _java_class code would be thrashing the cache. In my situation, I typically will have multiple jar-type files in my CLASSPATH. Some jars are from third parties, so they are mostly static. Other jars have code that changes frequently. So it would be nice if there was a per file cache, that would only be updated as the jar files changed. Also, it would be useful if the cache was based on the complete path of the jar file, not just the basename of the jar, since it is possible to have different versions of the same jar. Also, feel free to fix _java_class, I don't have much time. -FR. __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com