From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1529 invoked from network); 17 Apr 2001 14:11:06 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Apr 2001 14:11:06 -0000 Received: (qmail 23550 invoked by alias); 17 Apr 2001 14:10:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14003 Received: (qmail 23532 invoked from network); 17 Apr 2001 14:10:56 -0000 From: Sven Wischnowsky Date: Tue, 17 Apr 2001 16:10:54 +0200 (MET DST) Message-Id: <200104171410.QAA08041@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.dk Subject: Re: problem with _arguments exclusion lists In-Reply-To: <20010417135527.14921.qmail@web9305.mail.yahoo.com> Oliver Kiddle wrote: > ... > > What I was basically getting at there is something along the lines of > [[ $PREFIX$SUFFIX = [0-9]* ]] && _message 'number' > so that after -co, it could see that the `o' doesn't match [0-9]* and > would only complete further options (such as -conf). ;-) I understood you, really. But I'm pretty sure there are programs that allow other (single letter) options after that `-c', meaning that either `-c's argument is the empty string or that it comes in the next word. Or something. So I still think we need a way to tell _arguments that either: 1) after all `-x-:...' or `-x+:...' options other options may be completed, or 2) that after some of those options other options may be completed, or 3) (what you described) that the argument of option `-x+:...' has to match a certain pattern and if it doesn't match, other options are to be completed there. All that is independent of what we choose to use as the default. I.e., if we leave the current behaviour the default or if we make completing options there the default (unless otherwise specified). Or maybe I'm thinking way to complicated again and we should just make it try completing options in such places, too. If the user has already started typing the argument of the option, other option names won't match anyway. Leaves only the slight ugliness that `-c' would offer other single-letter options as possible completions (if _arguments was given the -s options), even if the command doesn't allow that after options that get an argument. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de