From 48936c691597bf05dc2a0fdae8f03afdbe9ccdaa Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Thu, 20 Oct 2016 09:12:53 +1100 Subject: [PATCH] Reduce startup time a teeny bit more by compiling the zcompdump file in the background --- config/zsh/zprofile | 3 ++- config/zsh/zshenv | 2 +- config/zsh/zshrc | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/config/zsh/zprofile b/config/zsh/zprofile index 4449713..b891a8f 100644 --- a/config/zsh/zprofile +++ b/config/zsh/zprofile @@ -1 +1,2 @@ -for f in $ZDOTDIR/login/*(-.N); source $f +#! zsh +for f in $ZDOTDIR/login/*(N); source $f diff --git a/config/zsh/zshenv b/config/zsh/zshenv index d7bc76b..3bf9cee 100644 --- a/config/zsh/zshenv +++ b/config/zsh/zshenv @@ -1 +1 @@ -for f in $ZDOTDIR/all/*(-.N); source $f +for f in $ZDOTDIR/all/*(N); source $f diff --git a/config/zsh/zshrc b/config/zsh/zshrc index 67108b1..246de63 100644 --- a/config/zsh/zshrc +++ b/config/zsh/zshrc @@ -1,7 +1,8 @@ source $ZDOTDIR/zplugin -for f in $ZDOTDIR/interactive/*; [[ -f $f ]] && source $f +for f in $ZDOTDIR/interactive/*(N); source $f -autoload -Uz compinit +autoload -Uz compinit zrecompile compinit -d $XDG_CACHE_HOME/zsh/zcompdump +([[ $_comp_dumpfile.zwc -nt $_comp_dumpfile ]] || zcompile $_comp_dumpfile) &! -[[ -o login ]] && for f in $ZDOTDIR/interactive+login/*(-.N); source $f +[[ -o login ]] && for f in $ZDOTDIR/interactive+login/*(N); source $f