zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: menuselect and history
Date: Thu, 22 Apr 2004 04:57:17 +0000	[thread overview]
Message-ID: <1040422045717.ZM15289@candle.brasslantern.com> (raw)
In-Reply-To: <20040420160802.12160.qmail@web10405.mail.yahoo.com>

On Apr 20,  9:08am, Felix Rosencrantz wrote:
}
} As Matthias predicted, this is cool. It would be even cooler if it
} could be connected to the incremental search commands. The list
} presented would be winnowed as the user types the search term.

This might be possible, but it'd be significantly more difficult.
Menu selection just doesn't work that way -- the incremental search
commands scan through the listing, they don't narrow it -- so what
in effect you'd need to do is exit from and restart completion on
every keystroke.

However, given the _history_select function that I posted, you can
do this:

autoload -U incremental-complete-word
zle -N incremental-complete-word
bindkey '^Xi' incremental-complete-word
zstyle :incremental list yes
zstyle ':completion:incremental:*' completer _history_select ...

(where "..." are whatever completers you normally would want to try)
and then when you type C-x i on the command word you should get exactly
what you just asked for, except that you _can't_ also scroll around in
the list of choices.

This does show a bug in incremental-complete-word -- the way that it
computes its prompt pre-dates some changes in the conventions for the
values of the _lastcomp association.  (There are likely to be other
outdated things about i-c-w that are problems waiting to happen.)


  reply	other threads:[~2004-04-22  4:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040419095235.GA1285@kopfermann.org>
2004-04-19 16:23 ` Bart Schaefer
2004-04-20 16:08   ` Felix Rosencrantz
2004-04-22  4:57     ` Bart Schaefer [this message]
2004-04-23  6:56       ` Felix Rosencrantz
2004-04-23 16:18         ` Bart Schaefer

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=1040422045717.ZM15289@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@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).