mattmc3 / antidote

https://getantidote.github.io - the cure to slow zsh plugin management
MIT License
855 stars 21 forks source link

Multiuser possibility? #184

Closed SHADOW-REX closed 3 months ago

SHADOW-REX commented 3 months ago

Is it possible to use a single antidote install for both the root user and the non-root main user? I want to use antidote for root too but doing a separate exact same install with the exact same plugins cloned again seems like a waste of space.

If anyone is willing to guide me to achieve such a setup, I'd be grateful.

mattmc3 commented 3 months ago

You could do this pretty easily by setting ANTIDOTE_HOME=/my/shared/antidote/home in both configurations. Would that satisfy your needs?

SHADOW-REX commented 3 months ago

I tried doing something like this but what happened is that after switching to the root user, it modified the cached plugins and therefore when i switched back to my user it gave me tons of permission error outputs.

mattmc3 commented 3 months ago

That shared path would have to be owned by a group that both root and your user are in for this to work effectively. Otherwise you'll have all sorts of permissions issues. This isn't a problem unique to antidote - there's a similar discussion with other plugin/package managers, and how they behave in multi-user scenarios as well. You may find some useful tips from those disucssions.

Out of curiosity, I ran a quick du -sh $(antidote home) to check the size of my Zsh plugins directory and learned that even with all my testing plugins, mine's only 50MB. Hardly a waste of space, but you may be using some plugins that are space hogs that I don't know about.

Regardless, I won't go so far as to tell you what's right for you in your setup, but antidote won't directly support this feature.