From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: simulation of dabbrev-expand
Date: Tue, 21 Sep 1999 09:20:48 +0200 (MET DST) [thread overview]
Message-ID: <199909210720.JAA12883@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Adam Spiers's message of Mon, 20 Sep 1999 23:00:59 +0100
Adam Spiers wrote:
> > > The completion system *should* be handling this for you, but I'm going to
> > > leave that bug to Sven, [ ... ]
> >
> > Hm, actually I don't think this is a bug -- at least it is intended
> > behaviour. Although I admit that I partly did this for performance
> > reasons. So, should duplicates always be removed or should this be an
> > option (we're in trouble with `compctl', then -- no more option
> > letters).
>
> I'd vote for the option er, option ... sorry :-) No idea what you
> should do about the option letters, other than using 8-bit-high
> options ;-)
This is the non-option implementation because a) I couldn't think of a
good option character (if someone has a suggestion and thinks we
should make this optional, tell me; what I'm really searching is
either something that is like `-v' but gives uniqified groups or
something that would be combined with `-v' to make it uniquify the
matches -- or we could make it remove duplicates unless that option is
given (and then make it combinable with `-J' too)).
Bye
Sven
diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c Mon Sep 20 18:55:07 1999
+++ Src/Zle/zle_tricky.c Mon Sep 20 18:52:48 1999
@@ -7272,13 +7272,23 @@
nl++;
}
*cp = NULL;
- } else
+ } else {
+ for (ap = rp; *ap; ap++) {
+ for (bp = cp = ap + 1; *bp; bp++) {
+ if (!matcheq(*ap, *bp))
+ *cp++ = *bp;
+ else
+ n--;
+ }
+ *cp = NULL;
+ }
for (ap = rp; *ap; ap++) {
if ((*ap)->disp && ((*ap)->flags & CMF_DISPLINE))
ll++;
if ((*ap)->flags & CMF_NOLIST)
nl++;
}
+ }
if (np)
*np = n;
if (nlp)
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-09-21 7:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-21 7:20 Sven Wischnowsky [this message]
1999-09-22 0:03 ` Adam Spiers
-- strict thread matches above, loose matches on Subject: below --
1999-09-22 14:11 Sven Wischnowsky
1999-09-22 14:57 ` Zefram
1999-09-22 22:13 ` Adam Spiers
1999-09-21 7:28 Sven Wischnowsky
1999-09-20 8:40 Sven Wischnowsky
1999-09-20 22:00 ` Adam Spiers
[not found] <19990909133913.A30055@thelonious.new.ox.ac.uk>
[not found] ` <990909171104.ZM15814@candle.brasslantern.com>
[not found] ` <19990916173409.A17932@thelonious.new.ox.ac.uk>
1999-09-17 21:44 ` Adam Spiers
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=199909210720.JAA12883@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.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).