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

Re: Overriding a yank* widget in zle



On Fri, Dec 31, 2010 at 12:28 AM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx>wrote:

> Perhaps a general solution would be that for *any* widget, not just a
> completion one, it should be possible to name a "prototype" widget whose
> behavior the new widget is intended to simulate or replace.
>

That seems like a great solution to me.

The only other solution to this that I've thought of would be to follow the
> example of the auto-suffix-remove and auto-suffix-retain widgets, that is,
> have a special widget whose only effect is to have the side-effect of
> enabling yank-pop on the next interaction: yank-pop-enable perhaps (is
> yank-pop-disable ever needed?).
>

Something like that would work if done right.  I tried something along those
lines (it was named "yank-noop"), but hadn't worked out the right bits to
make the flags stick around long enough before I changed direction.  I like
the prototype idiom best, though.

..wayne..


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