From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29767 invoked from network); 28 Mar 2001 15:21:02 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Mar 2001 15:21:02 -0000 Received: (qmail 11617 invoked by alias); 28 Mar 2001 15:20:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13819 Received: (qmail 11603 invoked from network); 28 Mar 2001 15:20:54 -0000 Message-ID: <20010328152053.7826.qmail@web9302.mail.yahoo.com> Date: Wed, 28 Mar 2001 16:20:53 +0100 (BST) From: =?iso-8859-1?q?Oliver=20Kiddle?= Subject: Re: PATCH: Re: Backticks and other tricks To: zsh-workers@sunsite.dk In-Reply-To: <200103280949.LAA16960@beta.informatik.hu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit --- Sven Wischnowsky wrote: > > Anyway, what I really wanted to say (and that's why it's on > -workers): > if you try this with a `&& return 0' after the `_arguments ...' > you'll > notice that competion after, e.g. `-ef1:' yields nothing. That's a > result of the change that removed the 300-return-value -- it has > added > the option itself and hence `_arguments' returns zero. Ugly. Very. I agree that it is a pity this can't be done anymore when you have state ->actions but I don't think it is as ugly as using compstate[nmatches] would be. We just have to use `&& ret=0' or similar and rely on checking of $state. The only other thing I can think of is modifying _main_complete to use compstate[nmatches] when deciding whether to move on to the next completer and allowing completion functions for commands to not bother about their return code. I'm not sure I like that though. > So for now let's use the patch below. It adds the options only if > there is no `->state' action to use or if we are not in the same word > after the option. I don't really understand this but it sounds like you're not going to be adding options in cases where they should be - options and states can both add matches together. Once we have this finalised, I will go through checking the return codes of functions (and adding -A "-*" and -S options to _arguments) but I don't have much time over the next two weeks. Oliver ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie