Use updated Zinit invocation approach

This commit is contained in:
Danielle McLean 2023-11-19 14:12:38 +11:00
parent a0beaae3c6
commit cb917cbfb6
Signed by: 00dani
GPG key ID: 52C059C3B22A753E
2 changed files with 13 additions and 11 deletions

View file

@ -1,6 +1,10 @@
#! zsh
ZINIT_HOME=${XDG_CACHE_HOME:-~/.cache}/zsh/zinit
if [[ -e $ZINIT_HOME/bin/zmodules/Src/zdharma/zplugin.so ]]; then
module_path+=( $ZINIT_HOME/bin/zmodules/Src )
zmodload zdharma/zplugin
typeset -A ZINIT
ZINIT[HOME_DIR]=${XDG_CACHE_HOME:-~/.cache}/zinit
ZINIT[BIN_DIR]=${ZINIT[HOME_DIR]}/zinit.git
ZINIT[ZCOMPDUMP_PATH]=${XDG_CACHE_HOME:-~/.cache}/zsh/zcompdump
if [[ -e ${ZINIT[HOME_DIR]}/module/Src/zdharma_continuum/zinit.so ]]; then
module_path+=( ${ZINIT[HOME_DIR]}/module/Src )
zmodload zdharma_continuum/zinit
fi

View file

@ -1,13 +1,11 @@
#! zsh
typeset -A ZINIT
ZINIT[HOME_DIR]=$ZINIT_HOME
ZINIT[ZCOMPDUMP_PATH]=$XDG_CACHE_HOME/zsh/zcompdump
if [[ ! -f $ZINIT_HOME/bin/zinit.zsh ]]; then
git clone https://github.com/zdharma-continuum/zinit $ZINIT_HOME/bin
zcompile $ZINIT_HOME/bin/zinit.zsh
[[ ! -d $ZINIT[HOME_DIR] ]] && mkdir -p $ZINIT[HOME_DIR]
if [[ ! -d $ZINIT[BIN_DIR]/.git ]]; then
git clone https://github.com/zdharma-continuum/zinit.git $ZINIT[BIN_DIR]
zcompile $ZINIT[BIN_DIR]/zinit.zsh
fi
source $ZINIT_HOME/bin/zinit.zsh
source $ZINIT[BIN_DIR]/zinit.zsh
load=light
zinit $load willghatch/zsh-saneopt