feat(zinit): add support for zinit's zsh module

This commit is contained in:
2021-04-19 02:20:16 +01:00
parent 5c1575b400
commit 680b3443b8
2 changed files with 7 additions and 0 deletions

6
zshrc
View File

@@ -26,6 +26,12 @@ declare -A ZINIT
ZINIT[HOME_DIR]="$HOME/.local/zsh/zinit"
ZINIT[BIN_DIR]="${ZINIT[HOME_DIR]}/bin"
# Load zinit module if it exists. For more info, run: zinit module help
if [ -d "${ZINIT[BIN_DIR]}/zmodules/Src/zdharma" ]; then
module_path+=("${ZINIT[BIN_DIR]}/zmodules/Src")
zmodload zdharma/zplugin
fi
# Ask to clone Zinit if it's not already available on disk.
[ ! -d "${ZINIT[BIN_DIR]}" ] &&
read -q "REPLY?Zinit not installed, clone to ${ZINIT[BIN_DIR]}? [y/N]:" &&