Skip to content

Instantly share code, notes, and snippets.

@elanora96
Last active August 4, 2024 18:42
Show Gist options
  • Save elanora96/b2424fa9f70d7549fd0590c58949f686 to your computer and use it in GitHub Desktop.
Save elanora96/b2424fa9f70d7549fd0590c58949f686 to your computer and use it in GitHub Desktop.
Oh My Zsh multiple "$ZSH_CUSTOM/plugins" workaround
# oh-my-zsh doesn't allow multiple ZSH_CUSTOM folders, here's a workaround
# Source: https://gist.github.com/elanora96/b2424fa9f70d7549fd0590c58949f686
local other_plugins_folders=("/usr/share/zsh/plugins" "$HOME/Projects/zsh-plugins")
for dir in "${other_plugins_folders[@]}"; do
if [[ -d "$dir" ]]; then
for sdir in "$dir"/*; do
if [[ -d "$sdir" ]] && [[ ! -e "$ZSH/custom/plugins/$(basename "$sdir")" ]]; then
ln -s "$sdir" "$ZSH/custom/plugins"
fi
done
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment