Enable the Zinit binary module, which efficiently zcompiles ALL sourced files
This commit is contained in:
parent
d2a5ca19a2
commit
89b24e14ee
4 changed files with 9 additions and 3 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
*.zwc
|
|
@ -4,6 +4,11 @@ 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/logout/*(N); source $f
|
for f in $ZDOTDIR/logout/^*.zwc(N); source $f
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
source $ZDOTDIR/zinit
|
source $ZDOTDIR/zinit
|
||||||
for f in $ZDOTDIR/interactive/*(N); source $f
|
for f in $ZDOTDIR/interactive/^*.zwc(N); source $f
|
||||||
|
|
||||||
zpcompinit && zpcdreplay
|
zpcompinit && zpcdreplay
|
||||||
([[ $ZINIT[ZCOMPDUMP_PATH].zwc -nt $ZINIT[ZCOMPDUMP_PATH] ]] || zcompile $ZINIT[ZCOMPDUMP_PATH]) &!
|
([[ $ZINIT[ZCOMPDUMP_PATH].zwc -nt $ZINIT[ZCOMPDUMP_PATH] ]] || zcompile $ZINIT[ZCOMPDUMP_PATH]) &!
|
||||||
|
|
||||||
[[ -o login ]] && for f in $ZDOTDIR/interactive+login/*(N); source $f
|
[[ -o login ]] && for f in $ZDOTDIR/interactive+login/^*.zwc(N); source $f
|
||||||
|
|
||||||
# If zsh init ends with a failing command (like a conditional) the prompt will
|
# If zsh init ends with a failing command (like a conditional) the prompt will
|
||||||
# show the "error" colour on first launch. To avoid this, we simply end with a
|
# show the "error" colour on first launch. To avoid this, we simply end with a
|
||||||
|
|
Loading…
Reference in a new issue