mattmc3 / antidote

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

Getting `antidote-load:48: is a directory` #146

Closed brandoncordell closed 1 year ago

brandoncordell commented 1 year ago

I've been using thoughtbot/dotfiles for the longest time to manage dotfiles but I've recently wanted to start over from scratch. I still want to use thoughtbot/rcm for the actual dotfile management. I was using zplug but want to upgrade to antidote. Using the following config I get antidote-load:48: is a directory: /Users/Bcordell/.zsh when zsh is loaded. Any ideas?

# .zsh_plugins
ohmyzsh/ohmyzsh path:plugins/git-prompt # Display information about the current git repository
zdharma-continuum/fast-syntax-highlighting # Faster syntax-highlighting for zsh
zsh-users/autosuggestions # Fish-like autosuggestions for zsh
zsh-users/zaw # zsh anything.el-like widget
zsh-users/zsh-history-substring-search # ZSH port of Fish history search (up arrow)
# .zshrc
source $HOME/.antidote/antidote.zsh
antidote load ${ZDOTDIR:-$HOME}/.zsh_plugins
mattmc3 commented 1 year ago

Interesting. I suspect that this is because you have specified an extensionless file (~/.zsh_plugins) as the plugin file, but then did not specify the cache file you wanted (~/.zsh_plugins.zsh). antidote load is just stripping the extension from .zsh_plugins and then making a .zsh file. This is a bug and I'll publish a fix when I am able. In the mean time, the simple workaround is to either:

1.) Rename .zsh_plugins to .zsh_plugins.txt, which lets you call antidote load without any arguments because you now are using the default files names. or 2.) Call antidote load with the second parameter, which is the cache file you want to create like so:

# .zshrc
source $HOME/.antidote/antidote.zsh
antidote load ${ZDOTDIR:-$HOME}/.zsh_plugins ${ZDOTDIR:-$HOME}/.zsh_plugins.zsh