Open mattmc3 opened 2 years ago
The problem implementing this remains the static file. If you use ohmyzsh/ohmyzsh
and also use myprojects/zsh_custom
, overriding what plugin is used gets tricky since a user could add/remove a plugin in zsh_custom at any time and the static file wouldn't know it. Adding logic to the static file would slow down the load. The complexity outweighs the convenience, but I may still revisit this if I ever come up with a clever way around this problem.
This one's been tumbling around in my brain for awhile because I don't want to implement this wrong and then regret it later and have features I'm stuck with. I think the simple solution to use ohmyzsh/ohmyzsh
followed by use $ZSH_CUSTOM
is simply that only one is in effect at a time, so you can only override, not have fallbacks. That also gets messy if load order matters because you might have to flip-flop between use
statements.
Another option is to support :command
statements, which then becomes a shortcut for something other than antidote-script
.
Examples might be:
:custom
- load plugin from $ZSH_CUSTOM:prezto
- load plugin from sorin-ionescu/prezto:ohmyzsh
- load plugin from ohmyzsh/ohmyzsh:zephyr
- load plugin from mattmc3/zephyrSo instead of...
### .zsh_plugins.txt
:use ohmyzsh/ohmyzsh
extract
git
history
...you could also do...
### .zsh_plugins.txt
:ohmyzsh extract
:ohmyzsh git
:ohmyzsh history
Or, we just leave things as-is, which is a working setup. None of these options feels clean, and it all adds (perhaps unnecessary) complexity. Not ready yet to implement this.
Regardless, the important callout is the static file would need to operate without any reliance on antidote functions being loaded - these :commands
would just change how bundling works.
Antigen allows you to use
antigen use
for frameworks like Oh-My-Zsh. Antibody abandoned this in favor of not treating frameworks in any special way, but I think this can easily be implemented in Antidote without framework specific code. Simply,antidote use ohmyzsh/ohmyzsh
and have it then let youbundle plugin_name
with an implementation of:lib
dirplugins
dir to a list ofuse
pathsuse
paths