From 25f3c517d884f0df1371f995aec3443173c60bcd Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 20 Jan 2020 12:51:33 +1100 Subject: [PATCH] Guarantee that the Zinit module is the first thing loaded whenever possible, so that everything else gets compiled and timed --- config/zsh/all/0-zinit-module | 6 ++++++ config/zsh/zinit | 6 ------ config/zsh/zprofile | 2 +- config/zsh/zshenv | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 config/zsh/all/0-zinit-module diff --git a/config/zsh/all/0-zinit-module b/config/zsh/all/0-zinit-module new file mode 100644 index 0000000..b59a739 --- /dev/null +++ b/config/zsh/all/0-zinit-module @@ -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 diff --git a/config/zsh/zinit b/config/zsh/zinit index 922f92e..648ad65 100644 --- a/config/zsh/zinit +++ b/config/zsh/zinit @@ -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 diff --git a/config/zsh/zprofile b/config/zsh/zprofile index b891a8f..eb95e94 100644 --- a/config/zsh/zprofile +++ b/config/zsh/zprofile @@ -1,2 +1,2 @@ #! zsh -for f in $ZDOTDIR/login/*(N); source $f +for f in $ZDOTDIR/login/^*.zwc(N); source $f diff --git a/config/zsh/zshenv b/config/zsh/zshenv index 3bf9cee..30519b2 100644 --- a/config/zsh/zshenv +++ b/config/zsh/zshenv @@ -1 +1,2 @@ -for f in $ZDOTDIR/all/*(N); source $f +setopt extended_glob +for f in $ZDOTDIR/all/^*.zwc(N); source $f