From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23731 invoked from network); 25 Apr 2000 11:47:55 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Apr 2000 11:47:55 -0000 Received: (qmail 25394 invoked by alias); 25 Apr 2000 11:47:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10915 Received: (qmail 25307 invoked from network); 25 Apr 2000 11:47:34 -0000 Date: Tue, 25 Apr 2000 13:47:32 +0200 (MET DST) Message-Id: <200004251147.NAA04794@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Sven Wischnowsky's message of Tue, 25 Apr 2000 11:45:20 +0200 (MET DST) Subject: Re: optional argument? I wrote: > ... > > At the weekend I hacked on _arguments (and comparguments) to allow > _arguments to complete more than one action when appropriate. And the > case above is of course one of cases where it is done. Just found out that I had forgotten to run diff again after the last changes, sorry. Bye Sven Index: Src/Zle/computil.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v retrieving revision 1.8 diff -u -r1.8 computil.c --- Src/Zle/computil.c 2000/04/25 09:48:09 1.8 +++ Src/Zle/computil.c 2000/04/25 11:46:26 @@ -1399,7 +1399,7 @@ for (; arg && (arg->num < 0 || (arg->min <= ca_laststate.nth + addopt && arg->num >= ca_laststate.nth));) { - if ((lopt = arg->type == CAA_OPT) && !opt && oopt > 0) + if (!opt && (lopt = arg->type != CAA_OPT) && oopt > 0) oopt = 0; addlinknode(descr, arg->descr); @@ -1446,7 +1446,7 @@ } } } - if (!single && opt && lopt) { + if (!single && opt && !lopt) { opt = NULL; arg = ca_get_arg(ca_laststate.d, ca_laststate.nth); -- Sven Wischnowsky wischnow@informatik.hu-berlin.de