Browse Source

zsh: cache compinit

Thomas Dy 4 years ago
parent
commit
e6c06e90b2
2 changed files with 8 additions and 2 deletions
  1. 0 2
      .zsh/config.zsh
  2. 8 0
      .zshrc

+ 0 - 2
.zsh/config.zsh

@@ -9,8 +9,6 @@ else
   alias yadm='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
 fi
 
-autoload -U compinit && compinit
-
 zstyle ':completion:*' menu select
 zstyle ':completion:*:default'         list-colors ${(s.:.)LS_COLORS}
 zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'

+ 8 - 0
.zshrc

@@ -19,3 +19,11 @@ if ! zplug check --verbose; then
 fi
 
 zplug load
+
+autoload -Uz compinit
+if [[ -n ~/.zcompdump(#qN.mh+24) ]]; then
+  compinit
+  touch ~/.zcompdump
+else
+  compinit -C
+fi