diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..416cfaa --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.zwc diff --git a/config/zsh/zinit b/config/zsh/zinit index 3814c69..922f92e 100644 --- a/config/zsh/zinit +++ b/config/zsh/zinit @@ -4,6 +4,11 @@ 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 diff --git a/config/zsh/zlogout b/config/zsh/zlogout index f4b368a..a5001da 100644 --- a/config/zsh/zlogout +++ b/config/zsh/zlogout @@ -1,2 +1,2 @@ #! zsh -for f in $ZDOTDIR/logout/*(N); source $f +for f in $ZDOTDIR/logout/^*.zwc(N); source $f diff --git a/config/zsh/zshrc b/config/zsh/zshrc index 3d1536b..946837e 100644 --- a/config/zsh/zshrc +++ b/config/zsh/zshrc @@ -1,10 +1,10 @@ source $ZDOTDIR/zinit -for f in $ZDOTDIR/interactive/*(N); source $f +for f in $ZDOTDIR/interactive/^*.zwc(N); source $f zpcompinit && zpcdreplay ([[ $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 # show the "error" colour on first launch. To avoid this, we simply end with a