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:
parent
89b24e14ee
commit
25f3c517d8
4 changed files with 9 additions and 8 deletions
6
config/zsh/all/0-zinit-module
Normal file
6
config/zsh/all/0-zinit-module
Normal 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
|
|
@ -1,14 +1,8 @@
|
||||||
#! zsh
|
#! zsh
|
||||||
typeset -A ZINIT
|
typeset -A ZINIT
|
||||||
ZINIT_HOME=$XDG_CACHE_HOME/zsh/zinit
|
|
||||||
ZINIT[HOME_DIR]=$ZINIT_HOME
|
ZINIT[HOME_DIR]=$ZINIT_HOME
|
||||||
ZINIT[ZCOMPDUMP_PATH]=$XDG_CACHE_HOME/zsh/zcompdump
|
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
|
if [[ ! -f $ZINIT_HOME/bin/zinit.zsh ]]; then
|
||||||
git clone https://github.com/zdharma/zinit $ZINIT_HOME/bin
|
git clone https://github.com/zdharma/zinit $ZINIT_HOME/bin
|
||||||
zcompile $ZINIT_HOME/bin/zinit.zsh
|
zcompile $ZINIT_HOME/bin/zinit.zsh
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#! zsh
|
#! zsh
|
||||||
for f in $ZDOTDIR/login/*(N); source $f
|
for f in $ZDOTDIR/login/^*.zwc(N); source $f
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
for f in $ZDOTDIR/all/*(N); source $f
|
setopt extended_glob
|
||||||
|
for f in $ZDOTDIR/all/^*.zwc(N); source $f
|
||||||
|
|
Loading…
Reference in a new issue