zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: Re: expand style `suffix' option
Date: Tue, 9 Oct 2001 11:48:37 +0200	[thread overview]
Message-ID: <15298.51189.867290.95567@gargle.gargle.HOWL> (raw)
In-Reply-To: <22027.1002298223@csr.com>


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<TAB> 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


  parent reply	other threads:[~2001-10-09  9:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-02 11:41 Peter Stephenson
2001-10-02 14:52 ` Bart Schaefer
2001-10-04 13:10 ` Sven Wischnowsky
2001-10-04 13:33   ` Peter Stephenson
2001-10-05 11:17     ` Sven Wischnowsky
2001-10-05 16:10       ` PATCH: " Peter Stephenson
2001-10-08 12:33         ` Sven Wischnowsky
2001-10-09  9:48         ` Sven Wischnowsky [this message]
2001-10-09 10:35           ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15298.51189.867290.95567@gargle.gargle.HOWL \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).