From ffa567b4d59939706f17e3d10ae76e645922b699 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 18 Jun 2018 10:45:37 +1000 Subject: [PATCH] Wire zcompdump into zplugin's handler, for better perf and accuracy --- config/zsh/zplugin | 1 + config/zsh/zshrc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/zsh/zplugin b/config/zsh/zplugin index eb4227f..df8e982 100644 --- a/config/zsh/zplugin +++ b/config/zsh/zplugin @@ -2,6 +2,7 @@ typeset -A ZPLGM ZPLG_HOME=$XDG_CACHE_HOME/zsh/zplugin ZPLGM[HOME_DIR]=$ZPLG_HOME +ZPLGM[ZCOMPDUMP_PATH]=$XDG_CACHE_HOME/zsh/zcompdump if [[ ! -f $ZPLG_HOME/bin/zplugin.zsh ]]; then git clone https://github.com/psprint/zplugin $ZPLG_HOME/bin diff --git a/config/zsh/zshrc b/config/zsh/zshrc index 6fc19cd..7fb326d 100644 --- a/config/zsh/zshrc +++ b/config/zsh/zshrc @@ -1,9 +1,9 @@ source $ZDOTDIR/zplugin for f in $ZDOTDIR/interactive/*(N); source $f -autoload -Uz compinit zrecompile -compinit -d $XDG_CACHE_HOME/zsh/zcompdump -([[ $_comp_dumpfile.zwc -nt $_comp_dumpfile ]] || zcompile $_comp_dumpfile) &! +autoload -Uz zrecompile +zpcompinit +([[ $ZPGLM[ZCOMPDUMP_PATH].zwc -nt $ZPGLM[ZCOMPDUMP_PATH] ]] || zcompile $ZPLGM[ZCOMPDUMP_PATH]) &! [[ -o login ]] && for f in $ZDOTDIR/interactive+login/*(N); source $f