From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2083 invoked from network); 12 May 2000 02:53:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 12 May 2000 02:53:19 -0000 Received: (qmail 12024 invoked by alias); 12 May 2000 02:53:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11333 Received: (qmail 11992 invoked from network); 12 May 2000 02:53:09 -0000 From: "Bart Schaefer" Message-Id: <1000512025303.ZM261@candle.brasslantern.com> Date: Fri, 12 May 2000 02:53:02 +0000 In-Reply-To: <200005110852.KAA15526@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "PATCH: Re: Assorted _arguments arguments" (May 11, 10:52am) References: <200005110852.KAA15526@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: Re: Assorted _arguments arguments MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 11, 10:52am, Sven Wischnowsky wrote: } Subject: PATCH: Re: Assorted _arguments arguments } } I said that I was thinking about using something like _argument_sets } for this. But, why not use _argument_sets itself? This allows the } set-strings be given as `(name)' meaning that all specifications in } that set are mutually exclusive with all other specs in the set. They } are mutually exclusive with the set in which they are, so to say. } } Example: } } _argument_sets \ } -common -options ':and:(arguments)' \ } - '(compress)' \ } {-c,--compress}'[compress]' \ } - '(decompress)' \ } {-d,--decompress}'[decompress]' } } Is that convenient enough? I haven't really worked at understanding _argument_sets very much, but: As I understand it, _argument_sets only works for fairly simple option combinations. As soon as you start needing ->state and the like, it's necessary to revert to using _arguments directly. Is it possible to combine the two in some useful way so that it isn't necessary to give up the above convenience in order to do more complex parsing? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com