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 #! zsh
ZINIT_HOME=${XDG_CACHE_HOME:-~/.cache}/zsh/zinit typeset -A ZINIT
if [[ -e $ZINIT_HOME/bin/zmodules/Src/zdharma/zplugin.so ]]; then ZINIT[HOME_DIR]=${XDG_CACHE_HOME:-~/.cache}/zinit
module_path+=( $ZINIT_HOME/bin/zmodules/Src ) ZINIT[BIN_DIR]=${ZINIT[HOME_DIR]}/zinit.git
zmodload zdharma/zplugin 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 fi

View file

@ -1,13 +1,11 @@
#! zsh #! 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 [[ ! -d $ZINIT[HOME_DIR] ]] && mkdir -p $ZINIT[HOME_DIR]
git clone https://github.com/zdharma-continuum/zinit $ZINIT_HOME/bin if [[ ! -d $ZINIT[BIN_DIR]/.git ]]; then
zcompile $ZINIT_HOME/bin/zinit.zsh git clone https://github.com/zdharma-continuum/zinit.git $ZINIT[BIN_DIR]
zcompile $ZINIT[BIN_DIR]/zinit.zsh
fi fi
source $ZINIT_HOME/bin/zinit.zsh source $ZINIT[BIN_DIR]/zinit.zsh
load=light load=light
zinit $load willghatch/zsh-saneopt zinit $load willghatch/zsh-saneopt