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

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

On Wed, Jul 31, 2019 at 3:30 AM Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
> On Wed, 31 Jul 2019 at 00:39, Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> > I'm on the fence on this issue. As long as I don't get too many bug
> > reports because of over-ambitious plugin managers, I'm fine.
> So Zplugin is considered an over-ambitious plugin manager by you? :)

I meant over-ambitious in the specific sense mentioned above --
advertising features that are not and cannot be implemented. There is
no way for users to tell whether unloading is safe to use zplugin to
unload X and what the consequences are if it isn't. Features whose
user-observable behavior cannot be described even in theory, and for
which an honest specification is tightly tied to their implementation
details, are over-ambitious. Saying that zplugin can unload arbitrary
code is inaccurate at best and deceptive at worst. What it can do is
unset parameters/functions/etc set by the code. Note how this refers
to the implementation and not the user-observable behavior. What the
user will actually see is unpredictable.

> Besides, isn't your prompt little
> over-ambitious too? ;) With the binary, background daemon? ;D

Spawning long-lived background processes that opt-out of job control
isn't uncommon among zsh themes and plugins. Powerline, p10k, p9k,
zinc, pure all do it. So does zplugin, I believe. The level of
daemonization and sharing differ: powerline detaches its child process
and shares it among multiple shells; p10k and everything else using
gitstatusd double-forks and creates a new session with setsid; pure
and zplugin leave their processes as children. Technical differences
in background process management make it impossible to implement clean
shutdown for these themes/plugins externally but they don't make them
over-ambitious. Powerline does what it claims to do -- give you a
prompt with lots of colors and ornaments. No leaky abstractions, no

Having said that, I have no illusions about the utility of my public
zsh code. If all zsh plugins and themes would disappear overnight, I
don't know if the world would be better or worse off. This ecosystem
feeds on customization addiction after all.


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