From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25528 invoked from network); 7 May 2001 11:11:08 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 May 2001 11:11:08 -0000 Received: (qmail 2721 invoked by alias); 7 May 2001 11:11:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14242 Received: (qmail 2707 invoked from network); 7 May 2001 11:11:02 -0000 From: Sven Wischnowsky Date: Mon, 7 May 2001 13:10:53 +0200 (MET DST) Message-Id: <200105071110.NAA02851@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.dk Subject: Re: problem with _arguments exclusion lists In-Reply-To: <3AF2D6E4.7FCCFD98@u.genie.co.uk> Oliver Kiddle wrote: > Sven Wischnowsky wrote: > > > > > [[ -n $PREFIX$SUFFIX && "$PREFIX$SUFFIX" != $~1 ]] && return 1 > > > > If we do that, no options will be completed after, e.g. `pine -c' (with > > your patch), because then the action returned zero. > > You're right. I got mixed up. I still don't like that last line in > _guard though. I think that maybe when _guard returns 0, matching > options should still be offered so a -c3nf option could be matched and > options would be offered after pine -c without that last line in _guard. > The important original point was really what happens when _guard returns > 1 and that is now right. > > ... > > It can't really be handled by anything else unless there is a specific > maximum to X display numbers allowing us to add all possibilities. > _guard is actually particularly valuable in the non-option argument case > because before the recent changes options would not complete. The > problem really is that the _guard patterns have to match fully, not > partially: _vnc can be fixed by using the pattern (|:[0-9]#) which I'll > commit later if _guard stays as it is. Well, _guard was just an attempt at helping in what I consider the usual completion style in most cases (i.e. what most people would expect or like to see in most cases). As I said, we could always add an option to _guard to specify other behaviour (for the return value or pattern matching or whatnot). Feel free to add one if you like. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de