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

Re: A serious bug in execution – where to debug?

On Tue, 30 Jul 2019 at 21:42, Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
> On Tue, Jul 30, 2019 at 9:34 PM Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
>> On Tue, 30 Jul 2019 at 21:24, Roman Perepelitsa
>> <roman.perepelitsa@xxxxxxxxx> wrote:
> I think we are in agreement. If there is a public function to unload, you can call it. If there isn't, it's a missing feature that cannot be provided by anyone other than the code's author. it's not possible to safely unload code as a blackbox without knowing all of its implementation details.

Yes, but that's in general. I have very positive experiences with
unloading of prompts. Currently in my setup by setting parameter
MYPROMPT=1..8 I can choose the prompt that's active, as described in:
http://zdharma.org/zplugin/site/Multiple-prompts/. In general it is
like you've said, e.g. syntax-highlighting plugin's won't unload
correctly, but only due to a final glitch and as I tested now, it
*did* unload correctly (due to changes in my setup, most probably).
But in general yes, plugins often do not unload fully clean, so I
think that we are in agreement.

> Both gitstatusd and p10k do provide public functions for unloading. You are welcome to call them. They guarantee that repeated load+unload won't leak resources. That is, as long as you don't unset any of their internal variables. They do leave a handful of global parameters after unloading; without them they cannot be loaded correctly again.

Could the function powerlevel10k_unload_plugin() be provided? I could
deduce it from the plugin's name and call it in a general manner.

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