From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23923 invoked from network); 9 Oct 2001 09:48:47 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Oct 2001 09:48:47 -0000 Received: (qmail 20208 invoked by alias); 9 Oct 2001 09:48:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15991 Received: (qmail 20192 invoked from network); 9 Oct 2001 09:48:39 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15298.51189.867290.95567@gargle.gargle.HOWL> Date: Tue, 9 Oct 2001 11:48:37 +0200 To: zsh-workers@sunsite.dk Subject: Re: PATCH: Re: expand style `suffix' option In-Reply-To: <22027.1002298223@csr.com> References: <15293.38579.803273.864907@gargle.gargle.HOWL> <22027.1002298223@csr.com> X-Mailer: VM 6.92 under 21.1 (patch 3) "Acadia" XEmacs Lucid Peter Stephenson wrote: > ... > > The only glitch I've come across is that you only get the top level > directory in the list even you are completing to multiple levels, > e.g. ~/b/b shows up a whole load of `bin/'s in the listing. One can, > of course, argue that this is perfectly reasonable: menu completion will > show the full set. That bug was in a different place than I first suspected. With unsorted groups (and neither -1 nor -2) duplicate matches were removed but it didn't make sure to hide matches showing the same string in the list. I'm pretty sure this wasn't done on purpose. > One could wish for an extra directory level to be shown > to resolve conflicts, but then one could wish for free chocolate. No change here, one can always set the list-sufffixes style to get that behaviour (although it would probably be sensible to do that automatically with menu-completion). Bye Sven Index: Src/Zle/compcore.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v retrieving revision 1.50 diff -u -r1.50 compcore.c --- Src/Zle/compcore.c 2001/08/20 13:13:50 1.50 +++ Src/Zle/compcore.c 2001/10/09 09:43:15 @@ -2654,6 +2654,8 @@ } } else { if (!(flags & CGF_UNIQALL) && !(flags & CGF_UNIQCON)) { + int dup; + for (ap = rp; *ap; ap++) { for (bp = cp = ap + 1; *bp; bp++) { if (!matcheq(*ap, *bp)) @@ -2662,6 +2664,17 @@ n--; } *cp = NULL; + if (!(*ap)->disp) { + for (dup = 0, bp = ap + 1; *bp; bp++) + if (!(*bp)->disp && + !((*bp)->flags & CMF_MULT) && + !strcmp((*ap)->str, (*bp)->str)) { + (*bp)->flags |= CMF_MULT; + dup = 1; + } + if (dup) + (*ap)->flags |= CMF_FMULT; + } } } else if (!(flags & CGF_UNIQCON)) { int dup; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de