From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7329 invoked from network); 9 Jun 1999 14:36:30 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Jun 1999 14:36:30 -0000 Received: (qmail 20089 invoked by alias); 9 Jun 1999 14:36:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6554 Received: (qmail 20077 invoked from network); 9 Jun 1999 14:36:05 -0000 Date: Wed, 9 Jun 1999 16:36:02 +0200 (MET DST) Message-Id: <199906091436.QAA21936@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Wed, 9 Jun 1999 16:53:38 +0400 Subject: Re: pws-21: multiple -X in compadd Andrej Borsenkow wrote: > cursh> foo() { > cursh function> compadd -J 1 -X "Options set 1" a111x a111y > cursh function> compadd -J 2 -X "Options set 2" a222x a222y > cursh function> } > cursh> } > itsrm2% compdef foo foo > itsrm2% foo a > itsrm2% foo a > Options set 1 > a111x a111y > Options set 2 > a222x a222y (press TAB once more) > itsrm2% foo a111x > Options set 1Options set 2 Two bugs (obviously): the missing newline and the fact that the list wasn't just left alone. Guess what I forgot to do for the first case. In the second case I forgot to add the test for the fancier menucompletion-stuff at that where the explanation strings are displayed when no match was found (or the list not otherwise shown). Bye Sven --- os/Zle/zle_tricky.c Wed Jun 9 11:24:34 1999 +++ Src/Zle/zle_tricky.c Wed Jun 9 16:31:53 1999 @@ -4368,10 +4368,10 @@ invalidatelist(); /* Print the explanation strings if needed. */ - if (!showinglist && validlist && nmatches != 1) { + if (!showinglist && validlist && usemenu != 2 && nmatches != 1) { Cmgroup g = amatches; Cexpl *e; - int up = 0, tr = 1; + int up = 0, tr = 1, nn = 0; if (!nmatches) feep(); @@ -4384,7 +4384,12 @@ trashzle(); tr = 0; } + if (nn) { + up++; + putc('\n', shout); + } up += printfmt((*e)->str, (*e)->count, 1); + nn = 1; } e++; } -- Sven Wischnowsky wischnow@informatik.hu-berlin.de