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

Re: Why the widget bound to menuselect isn't called?



Sebastian Gniazdowski wrote:
> It seems to me that the main problem / idea is to replace the above
> check(s) which are keymap-specific to a more general solution, which
> would:
> ??? allow automatic mapping of an invocation of a widget to a
> $KEYMAP-variant of the widget
> ??? provide a set of base widgets that are $KEYMAP-specific, so that
> users can use them as the building blocks of custom widgets.

Yes. However, there would be further problems like ensuring that non-
menu selection widgets abort menu selection and preserve backwards
compatibility as far as possible. Providing basic widgets
would be the easy (but tedious) part. The automatic mapping is harder
because an approach needs to be worked out and designed.

> Then:
> ??? the above check(s) are an entry point to a set of such
> keymap-specific widgets and seem to implement the keymap-specific
> automatic selection of the widgets, however they're a high level
> widgets, not a fine-grained building blocks,
> ??? because of this lack of fine-grained widgets the designers of the
> code decided to not allow overloading of them.
>
> Is this correct? Because if yes, then it would seem that the existing
> mechanism can be still used, if the fine-grained widgets will be
> provided and the overloading of the widgets will be enabled.

I'm not sure I follow what you're saying. It may have been better if
there had been fine-grained widgets to begin with but that alone is not
sufficient (either now or at the time of the module's inception).

> It seems that it is about forwarding the keymap-specific mechanism to
> the Zshell code in an consistent way with the C code. The question is
> is this necessary?

Consistency with Functions/Zle/keymap+widget isn't necessary.
Not breaking backwards compatibility that allows menu selection key
bindings to reflect users' normal key bindings is necessary. I was
trying to outline some vague ideas on how this might be approached.

Oliver



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