Wire zcompdump into zplugin's handler, for better perf and accuracy

This commit is contained in:
Danielle McLean 2018-06-18 10:45:37 +10:00
parent ad0d9f72f5
commit ffa567b4d5
Signed by: 00dani
GPG key ID: 8EB789DDF3ABD240
2 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -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