-
If you want to use Oh-My-Zsh with antidote, how would you do that? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You can use Oh-My-Zsh (OMZ) plugins just like any other plugin with the help of antidote's Depending on what plugins you use, this might require you to do some extra setup since OMZ plugins don't expect to be loaded outside of OMZ. For example, many OMZ plugins will require you to bundle OMZ's 'lib' directory before using them. (If you are an advanced user, you may be able get away with bundling only the parts of lib you need, which for some plugins is nothing). You may find you also need to set some OMZ specific variables from oh-my-zsh.sh in your For example, here's what your .zshrc and your .zsh_plugins.txt might look like when using OMZ: .zshrc# prep antidote
source /path/to/antidote.zsh
# set omz variables
ZSH=$(antidote path ohmyzsh/ohmyzsh)
ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/oh-my-zsh"
[[ -d $ZSH_CACHE_DIR ]] || mkdir -p $ZSH_CACHE_DIR
# load antidote
antidote load .zsh_plugins.txt# OMZ has a lot of dependancies on its lib directory.
# Load everything in path:lib before loading any plugins
ohmyzsh/ohmyzsh path:lib
# Now, many plugins or themes should work fine
ohmyzsh/ohmyzsh path:plugins/git
ohmyzsh/ohmyzsh path:plugins/extract
ohmyzsh/ohmyzsh path:plugins/magic-enter
ohmyzsh/ohmyzsh path:plugins/fancy-ctrl-z
ohmyzsh/ohmyzsh path:themes/robbyrussell.zsh-theme |
Beta Was this translation helpful? Give feedback.
-
I just read through the source code of TL;DRWorkaround exampleModify from the code above, credit to @mattmc3.
|
Beta Was this translation helpful? Give feedback.
You can use Oh-My-Zsh (OMZ) plugins just like any other plugin with the help of antidote's
path:
annotation. Antidote doesn't treat OMZ as special, so it behaves the same as any other bundle.Depending on what plugins you use, this might require you to do some extra setup since OMZ plugins don't expect to be loaded outside of OMZ.
For example, many OMZ plugins will require you to bundle OMZ's 'lib' directory before using them. (If you are an advanced user, you may be able get away with bundling only the parts of lib you need, which for some plugins is nothing).
You may find you also need to set some OMZ specific variables from oh-my-zsh.sh in your
.zshrc
in order for OMZ to work properly.…