Last active
August 4, 2024 18:42
-
-
Save elanora96/b2424fa9f70d7549fd0590c58949f686 to your computer and use it in GitHub Desktop.
Oh My Zsh multiple "$ZSH_CUSTOM/plugins" workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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