From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1418 invoked from network); 17 Apr 2001 13:55:38 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Apr 2001 13:55:38 -0000 Received: (qmail 16439 invoked by alias); 17 Apr 2001 13:55:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14002 Received: (qmail 16418 invoked from network); 17 Apr 2001 13:55:30 -0000 Message-ID: <20010417135527.14921.qmail@web9305.mail.yahoo.com> Date: Tue, 17 Apr 2001 14:55:27 +0100 (BST) From: =?iso-8859-1?q?Oliver=20Kiddle?= Subject: Re: problem with _arguments exclusion lists To: zsh-workers@sunsite.dk In-Reply-To: <200104171128.NAA05617@beta.informatik.hu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit --- Sven Wischnowsky wrote: > > _arguments -s '(-conf)-c+:val' '-conf' '-f' > > after -c, it completes with the 'val' message so even after -co, it > > can't complete -conf. I found these problems with _pine which > > completes a number after -c. > Yes, i was aware of that. The problem is that some programs would > not > continue parsing `-c...' as a possible option, while some would. I > think I would call such programs `well-behaved'. I think you've misunderstood me here. Are you thinking of the case where, for the _arguments example above some programs maybe allow the `f' option after -c as `-cf3' to mean the same as `-c3 -f'? In a case such as _pine, after `-c', there can either be a number which is an argument to the -c option or it could go on to complete an option with a longer name such as -conf, -character-set etc. At the moment, it fails to complete the latter and it should do. This was the intended gist of my last message. > > Maybe there would be a use here for a basic > > completion for numbers so that it can know that -co can not be -c > with > > a parameter. 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). 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