Guarantee that the Zinit module is the first thing loaded whenever possible, so that everything else gets compiled and timed

This commit is contained in:
Danielle McLean 2020-01-20 12:51:33 +11:00
parent 89b24e14ee
commit 25f3c517d8
Signed by: 00dani
GPG key ID: FF6F9216852288FF
4 changed files with 9 additions and 8 deletions

View file

@ -0,0 +1,6 @@
#! zsh
ZINIT_HOME=${XDG_CACHE_HOME:-~/.cache}/zsh/zinit
if [[ -d $ZINIT_HOME/bin/zmodules/Src/zdharma ]]; then
module_path+=( $ZINIT_HOME/bin/zmodules/Src )
zmodload zdharma/zplugin
fi

View file

@ -1,14 +1,8 @@
#! zsh
typeset -A ZINIT
ZINIT_HOME=$XDG_CACHE_HOME/zsh/zinit
ZINIT[HOME_DIR]=$ZINIT_HOME
ZINIT[ZCOMPDUMP_PATH]=$XDG_CACHE_HOME/zsh/zcompdump
if [[ -d $ZINIT_HOME/bin/zmodules/Src/zdharma ]]; then
module_path+=( $ZINIT_HOME/bin/zmodules/Src )
zmodload zdharma/zplugin
fi
if [[ ! -f $ZINIT_HOME/bin/zinit.zsh ]]; then
git clone https://github.com/zdharma/zinit $ZINIT_HOME/bin
zcompile $ZINIT_HOME/bin/zinit.zsh

View file

@ -1,2 +1,2 @@
#! zsh
for f in $ZDOTDIR/login/*(N); source $f
for f in $ZDOTDIR/login/^*.zwc(N); source $f

View file

@ -1 +1,2 @@
for f in $ZDOTDIR/all/*(N); source $f
setopt extended_glob
for f in $ZDOTDIR/all/^*.zwc(N); source $f