mattmc3/antidote

Oh-My-ZSH plugins are installed but not active

Closed this issue · 5 comments

I just switched from antigen and I'm having difficulty migrating to antidote.

Specifically, I have several plugins installed but they are not active.

For example, I am trying to get direnv working, a utility which automatically loads the .envrc file when you enter a directory. Direnv requires this shell script to run at the beginning of a terminal session. My .envrc files aren't getting loaded, so I know the script wasn't run.

I tried installing the plugin, but I'm informed it's already installed:

> antidote install ohmyzsh/ohmyzsh plugins:direnv
antidote: error: ohmyzsh/ohmyzsh already installed: /Users/aneil/Library/Caches/antidote/https-COLON--SLASH--SLASH-github.com-SLASH-ohmyzsh-SLASH-ohmyzsh

I realize I could just do antidote bundle ..., but the main benefit of antidote is improving load speed, so I want to get the static file loader working.

I've had problems similar to this with several plugins (all from Oh-My-Zsh, but I haven't checked any others). For example, nvm also needs a bit of startup script loaded. I have the plugin installed, but the script is never run.

Thanks for any help.

The install command is meant to be run only once during an interactive session. It's not meant to be used in your .zshrc. Install adds your plugins to your .zsh_plugins.txt file. That file is loaded with the load command in your .zshrc. You can also use the bundle command just like antigen, but you'll fall back to less performant dynamic loading. Have a look at https://getantidote.github.io and read the install and usage sections, or if you prefer to see a working example config, you can see one here: https://github.com/getantidote/zdotdir

Thanks for the reply @mattmc3, sorry I wasn't clear. I am not using antidote install in .zshrc, I was showing my command line usage and results.

When I start a new terminal, despite having installed these packages, I don't get the expected behavior. I should have said that I started with the zdot repo, and only did a minimal change: I did the following at the command line, then opened a new terminal session:

antidote install ohmyzsh/ohmyzsh plugins:direnv

Thanks for the clarification @aneilbaboo. Do you have your dotfiles published anywhere or can you post the relavent parts here from your .zshrc and .zsh_plugins.txt?

Sorry for the delay. They're here: https://github.com/aneilbaboo/zdotdir

I symlinked the .zshrc, .zshenv and .zshprofile to my home dir.

@aneilbaboo Did you eventually solve your issue with direnv?