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

Is current widget system suitable? RE: new menu selection and Re: New compinstall and bindkey



> If we change it we should probably give another widget a special
> meaning in menu-select so that we have one for the current behaviour
> and one for `leave menu-selection and accept the current match'. With
> that users could do a `bindkey -M menuselect ...' to get their
> prefered behavior. So: any suggestions for which widget we should use?
> (Remember that one couldn't use this widget to leave menu-select,
> then.) And what should be the default?
>

I wanted to write about this anyway. Unfortunately, current widget system is not
well suited for programming (in user-defined widgets). Currently widgets mostly
are "high-level" ones, that do fairly complex tasks. That was fine when all
widgets were builtin ones. But now more of a low-level, primitive widgets are
needed - that do some well defined atomic action. Good example is completion.
What is needed is probably such primitives as next-match, previous-match,
insert-match, exit-menu etc. Using these most of other tasks could be easily
porgrammed with user-defined widgets - and if some prove universally useful,
they could be implemented as builtin.

This assumes, that user-defined widgets work. As my recent example shows, not
quite :-)

/andrej



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