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

Re: bracket-paste-magic adds backslashes inside a quoted string if URL is pasted ("regression" compared to pre-5.1 url-quote-magic)

On Fri, May 13, 2016 at 8:00 PM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> Asking the user to explicitly invoke from pre-redraw all plugins that
> need to be invoked from pre-redraw would be a compatibility / upgrades
> nightmare: whenever a plugin that previously didn't use pre-redraw would
> want to start using pre-redraw, all that plugin's end users would have
> to edit the Single Master Pre-Redraw Function in their .zshrc's, in
> lockstep with installing the updated plugin.  This would simply not
> scale.
> What would scale is an interface similar to the one add-zsh-hook
> provides for non-zle hooks: an interface that allows an arbitrary number
> of registrations, where the various registrants — be they the user's
> .zshrc or plugins — need not know or care whether there are other
> registrants.

I was never very happy with the built-in variables for lists of hooks,
particularly because they needed an externally-defined helper
(add-zsh-hook) to make them practical.  I think add-zsh-hook could
have been written entirely in terms of the original precmd et al.
functions without the corresponding variables.

Hence I also think that a plugin registry for the special zle hook
widgets ought to be implemented externally, and the plugins agree to
make use of it -- because if the plugins don't follow such a
convention then the user has to update .zshrc in lockstep with the
plugin installation anyway.

This convention could include allowing plugins to describe (or at
least suggest) the order in which their hook should be called.

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