zsh/41-zinit.zsh

17 lines
477 B
Bash

declare -A ZINIT
ZINIT[HOME_DIR]="$ZSH_CACHE_DIR/zinit"
ZINIT[PLUGINS_DIR]="$ZSH_CACHE_DIR/plugins"
ZINIT[SNIPPETS_DIR]="$ZSH_CACHE_DIR/snippets"
ZINIT[ZCOMPDUMP_PATH]="$ZSH_CACHE_DIR/zcompdump"
ZPFX="$ZSH_CACHE_DIR/polaris"
if [ ! -d "$ZINIT[HOME_DIR]" ]; then
git clone https://github.com/zdharma-continuum/zinit "$ZINIT[HOME_DIR]"
zcompile "$ZINIT[HOME_DIR]/zinit.zsh"
fi
source "$ZINIT[HOME_DIR]/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit