From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3612 invoked from network); 4 Feb 2000 14:18:31 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Feb 2000 14:18:31 -0000 Received: (qmail 6589 invoked by alias); 4 Feb 2000 14:18:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9568 Received: (qmail 6581 invoked from network); 4 Feb 2000 14:18:22 -0000 Date: Fri, 4 Feb 2000 15:18:20 +0100 (MET) Message-Id: <200002041418.PAA29032@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 04 Feb 2000 22:16:39 +0900 Subject: Re: _arguments problems Tanaka Akira wrote: > So, I think following behaviour is also problem. > > is27e1u11% _tst () { _arguments '-a' '*::rest:(rest)' } > is27e1u11% tst arg - > -> > is27e1u11% tst arg -a > > Because I think _arguments shouldn't completes options after an > argument handled by `*::message:action'. That's a completely different problem. And since the option-rest specs do that I agree that normal rest specs should do the same. Bye Sven diff -ru ../z.old/Src/Zle/computil.c Src/Zle/computil.c --- ../z.old/Src/Zle/computil.c Fri Feb 4 13:32:02 2000 +++ Src/Zle/computil.c Fri Feb 4 15:12:22 2000 @@ -1039,7 +1039,7 @@ zfree(ca_laststate.oargs, ca_laststate.d->nopts * sizeof(LinkList)); } - /* MArk everything as active. */ + /* Mark everything as active. */ for (ptr = d->opts; ptr; ptr = ptr->next) ptr->active = 1; @@ -1406,8 +1406,10 @@ return 1; } case 'O': - if (ca_laststate.opt || (ca_laststate.doff && ca_laststate.def) || - (ca_laststate.def && ca_laststate.def->type == CAA_OPT)) { + if ((ca_laststate.opt || (ca_laststate.doff && ca_laststate.def) || + (ca_laststate.def && ca_laststate.def->type == CAA_OPT)) && + (!ca_laststate.def || ca_laststate.def->type < CAA_RARGS || + compcurrent == 1)) { LinkList next = newlinklist(); LinkList direct = newlinklist(); LinkList odirect = newlinklist(); -- Sven Wischnowsky wischnow@informatik.hu-berlin.de