zsh-workers
 help / color / mirror / code / Atom feed
From: Adam Spiers <adam@thelonious.new.ox.ac.uk>
To: zsh workers mailing list <zsh-workers@sunsite.auc.dk>
Subject: Re: simulation of dabbrev-expand
Date: Fri, 17 Sep 1999 22:44:55 +0100	[thread overview]
Message-ID: <19990917224455.C3509@thelonious.new.ox.ac.uk> (raw)
In-Reply-To: <19990916173409.A17932@thelonious.new.ox.ac.uk>

Adam Spiers, on thelonious (adam@thelonious.new.ox.ac.uk) wrote:
> Bart Schaefer (schaefer@candle.brasslantern.com) wrote:
> > On Sep 9,  1:39pm, Adam Spiers wrote:
> > } It appears to always work fine when grabbing words from history added
> > } by the current shell, but either doesn't work at all, or very
> > } unreliably when you want to grab a word from the saved history.
> > 
> > Can you perhaps give a more specific example?  I'm not having any trouble
> > with this at all.
> 
>   % history 1 | grep ' /' | wc -l
>       650
>   % less /<TAB>
>   % less /usr/share/zsh/functions/_man
>   zsh: do you wish to see all 51 possibilities? 
> 
> Where did all the others go?

[snip]

> The newer entries work fine.  This problem has
> exhibited itself in exactly the same way across zsh-3.1.6-pws-* :-(

I've done a lot of further investigation into this, and *still* cannot
spot an exact pattern to when it does and doesn't work, which is
unbelievably frustrating.  However, I'm beginning to suspect that it
may have something to do with history duplicates.  Sven's latest patch
to _history_complete_word is very nice, but if the `history_sort'
configuration key is unset, no sorting occurs, and hence no removal of
duplicates.  (As we're talking about individual words extracted from
the history, the options dealing with history line duplicates have
little bearing on this.)

How can I ensure that there are no duplicate words in the list of
matches?  Even if this isn't the real problem I'm experiencing, it may
well help narrow it down.  This questions leads me to another: we have
all these variables at our disposal in the widget functions for
examining the completion system's state in great detail ... but the
one thing we still can't do (AFAICS) is actually see what completions
have currently been calculated.  If there was a special array
parameter, `completions' say, then things like removing duplicate
matches, or choosing your own match sorting algorithm (although heaven
forbid I would ever need to implement a quicksort in zsh :-) would
become possible in the shell functions.  Have I missed something here?

Adam


       reply	other threads:[~1999-09-17 21:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
1999-09-18 19:59       ` PATCH: 3.1.6-pws-4: " Bart Schaefer
1999-09-22 22:21         ` Adam Spiers
1999-09-20  8:40 Sven Wischnowsky
1999-09-20 22:00 ` Adam Spiers
1999-09-21  7:20 Sven Wischnowsky
1999-09-22  0:03 ` Adam Spiers
1999-09-21  7:28 Sven Wischnowsky
1999-09-22 14:11 Sven Wischnowsky
1999-09-22 14:57 ` Zefram
1999-09-22 22:13 ` 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=19990917224455.C3509@thelonious.new.ox.ac.uk \
    --to=adam@thelonious.new.ox.ac.uk \
    --cc=adam@spiers.net \
    --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).