Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: menuselect and history



[redirected to -workers]

Bart wrote:
> On Apr 19, 11:52am, Matthias Kopfermann wrote:
> > 
> > i just wondered whether it wouldn't be very cool if menuselect was
> > useable with historylines.
> 
> --- 8< --- snip --- 8< ---
> #compdef -k menu-select ^X:

Very nice.

> emulate -L zsh
> zmodload -i zsh/parameter || return 1

I would tend to be inclined to use _generic to avoid needing such setup
code. Also makes it a lot more configurable. Trouble is, that you need
to manually define:
  zle -C history-lines menu-complete _generic
  zstyle ':completion:history-lines::::' completer _history_lines
  bindkey '^X:' history-lines

I wonder if we should make #compdef -k, make widgets go through
_generic somehow. It isn't ideal that with #compdef -k, the function is
effectively operating outside of compsys, using raw compwid.

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author