From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1543 invoked from network); 20 Aug 2002 12:20:18 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 20 Aug 2002 12:20:18 -0000 Received: (qmail 18549 invoked by alias); 20 Aug 2002 12:19:56 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5271 Received: (qmail 18535 invoked from network); 20 Aug 2002 12:19:54 -0000 X-VirusChecked: Checked Date: Tue, 20 Aug 2002 11:32:24 +0100 From: Oliver Kiddle To: Felix Rosencrantz Cc: Bill Burton , Zsh users Subject: Re: [SUBMIT] _ant completion function Message-ID: <20020820103224.GA22728@logica.com> References: <20020820010627.68232.qmail@web10409.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020820010627.68232.qmail@web10409.mail.yahoo.com> User-Agent: Mutt/1.3.28i Sender: Oliver Kiddle On Mon, Aug 19, 2002 at 06:06:27PM -0700, Felix Rosencrantz wrote: > > Target elements have a "description" attribute, like they have a "name" > attribute. Okay thanks. > > On the 4.1 branch, there is a _java_class function which is meant to do > > this but I can't entirely make sense of what it is doing and how to get > > it to use $ANT_HOME/lib/*.jar as you suggest. It ought to use > > _multi_parts too. > > You don't explain what is confusing you. Though there are several things Well, a number of things, some of which you've now explained. 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. Can a classpath contain things like '*.jar' or for _ant should it be expanding the glob. > The other thing is that _java_class looks at opt_args for -classpath or -cp. > This is ugly, really should be a better way to pass these values without > having to go to a state. 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. > Could we add _java_class to 4.0? Is there something about it that would > not allow us to add it? I'd be in favour of adding it and can't see any particular reason not to. > 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. Oliver This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.