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

A more advanced tracking of plugins in Zplugin

out of the discussion with romkatv I've updated the tracking and
unloading of Zle widgets in Zplugin. The stacking of Zle widgets now
gets resolved. So for example, if 1st plugin will do:

    zle -N -- orig-vi-backward-char ${widgets[vi-backward-char]#user:}
    eval "_wrap_vi-backward-char() {
        …do something additional here
        zle orig-vi-backward-char
    zle -N -- vi-backward-char _wrap-vi-backward-char

and then a second plugin does the same, then unloading of the first
plugin will correctly redirect the zle orig-vi-backward-char of the
second plugin above the seconth plugin to the preceding
vi-backward-char widget.

Side for that, there's a new ice-mod wrap-track'' which takes a list
of names of functions that should  be tracked *once*. In other words,
it wraps the functions with a preceding and following code that
enables and disables the tracking, and then unwraps the function after
the first call. You can use this to extend the tracking beyond the
moment of loading of a plugin, for example prompts often postpone
their initialization to a precmd hook, which can be tracked with the

Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

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