From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1466 invoked from network); 5 Oct 2000 08:53:30 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Oct 2000 08:53:30 -0000 Received: (qmail 13847 invoked by alias); 5 Oct 2000 08:53:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12897 Received: (qmail 13840 invoked from network); 5 Oct 2000 08:53:16 -0000 Date: Thu, 5 Oct 2000 10:53:14 +0200 (MET DST) Message-Id: <200010050853.KAA12892@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Wed, 4 Oct 2000 15:05:43 +0000 Subject: Re: PATCH: Redo _zle using _arguments Bart Schaefer wrote: > On Oct 4, 2:47pm, Sven Wischnowsky wrote: > } > } Bart Schaefer wrote: > } > } > I also suspect there may be a bug in comparguments -- the '(*)-x' form of > } > optspec is supposed to mean that the '*:msg:act' form is not completed > } > when -x is on the command line, but that doesn't seem to happen (or at > } > least, not always). > } > } Hm, I had a look but couldn't find a bug. Could you give me an example? > > Sure. Completion after "zle -R -c": > > zagzig[501] zle -R -c > Completing status line > Completing strings to list > > The call to _arguments was: > > _arguments -s \ > "-R[redisplay]" \ > "(*)-c[clear listing]" \ > "(-)::status line: " "*:strings to list: " Aha. In combination with an optional argument. Right, it was used the rest-spec even though that was inactivated. Bye Sven Index: Src/Zle/computil.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v retrieving revision 1.42 diff -u -r1.42 computil.c --- Src/Zle/computil.c 2000/08/14 08:16:45 1.42 +++ Src/Zle/computil.c 2000/10/05 08:52:07 @@ -1685,7 +1685,8 @@ if (!opt) { if (arg->num >= 0 && !arg->next && miss) - arg = ca_laststate.d->rest; + arg = (ca_laststate.d->rest && ca_laststate.d->rest->active ? + ca_laststate.d->rest : NULL); else { onum = arg->num; rest = (onum != arg->min && onum == ca_laststate.nth); @@ -1693,7 +1694,8 @@ if (arg->num != onum + 1) miss = 1; } else if (rest || (oopt > 0 && !opt)) { - arg = ca_laststate.d->rest; + arg = (ca_laststate.d->rest && ca_laststate.d->rest->active ? + ca_laststate.d->rest : NULL); oopt = -1; } } @@ -1711,7 +1713,8 @@ } if (!opt && oopt > 0) { oopt = -1; - arg = ca_laststate.d->rest; + arg = (ca_laststate.d->rest && ca_laststate.d->rest->active ? + ca_laststate.d->rest : NULL); goto rec; } -- Sven Wischnowsky wischnow@informatik.hu-berlin.de