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

Chain widgets call (was: RE: PATCH: more fun with `zle')



>
> ((${+NUMERIC})) || zle .set-local-history
> if [[ $WIDGET == .* ]]
> then
>     zle $WIDGET
> else
>     zle .$WIDGET
> fi
> ((${+NUMERIC})) || zle .set-local-history
>

And looking at this I realised, that it has some basic problem. Every other
*history* widget could already be redefined to whatever you like. What I want to
do is ismply to set special environment and call _original_ widget ... that is
not quite the same as calling .immortal version. But there is no way to "chain"
definitions ... Doing it would probably mean

 - special syntax to "push" instead of "replace" definition
 - special syntax with meaning "call previous definition for current widget"

And the question is, how generally useful is it at all?

/andrej



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