Zsh Mailing List Archive
Messages sorted by:
Re: zstyle question: enter menu selection on lots of ambiguity
- X-seq: zsh-workers 12417
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: zstyle question: enter menu selection on lots of ambiguity
- Date: Fri, 28 Jul 2000 09:00:27 +0200 (MET DST)
- In-reply-to: "Bart Schaefer"'s message of Thu, 27 Jul 2000 17:19:31 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bart Schaefer wrote:
> On Jul 27, 12:58pm, Sven Wischnowsky wrote:
> } Subject: Re: zstyle question: enter menu selection on lots of ambiguity
> } Bart Schaefer wrote:
> } > If I use both, I get menu-selection on the second tab and on C-d, and
> } > sometimes more of the strange behavior (the same match inserted on the
> } > line multiple times and stuff like that -- I think it happens if you hit
> } > C-d repeatedly after completion or selection has started when the match
> } > on the line (highlighted, in selection) is NOT a directory).
> } That perfectly ok'ish, actually. The ^D leaves menu selection, keeping
> } the currently selected match on the line, and makes the widget bound
> } to it be executed.
> Hmm, I'm not sure how to react to that. C-d doesn't stop normal menu
> completion; you have to type space or slash or whatever to "accept" the
> match before generating a new list. I suppose that's because in the
> absence of `autolist' there won't be any listing yet, whereas with menu-
> selection there's always a listing.
You could do:
bindkey -M menuselect '^D' redisplay
to make ^D have no (visible) effect.
> } So, with this patch, you can do:
> } zstyle ':completion:*' menu yes=long select=long
> } if you want selection only if the list is too long for the screen.
> } Of course you can also combine it with `select=<num>'.
> OK, great, thanks! So now ... how do I combine it with select=<num> in
> such a way that I get menu-selection on the first tab when the list is
> too long for the screen and on the second tab when the list is more than
> <num> elements long?
You can give `select=*' more than once, which especially makes sense
if it's once with a number and once with `long*':
zstyle '*' menu yes=long select=long select=10
(the manual says `In addition to (or instead of)...').
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by: