summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2020-12-29 12:43:03 +0100
committerAlan Pearce2020-12-29 20:00:43 +0100
commit6c90b0cc95e05ebdd25bbe1a41aa586643f494c7 (patch)
tree6593a28a1c346062b033ece6833bf4f41fdf6bcf
parent2dee90e356aa218d5b9906fee768f04d4d621724 (diff)
downloadnixfiles-6c90b0cc95e05ebdd25bbe1a41aa586643f494c7.tar.lz
nixfiles-6c90b0cc95e05ebdd25bbe1a41aa586643f494c7.tar.zst
nixfiles-6c90b0cc95e05ebdd25bbe1a41aa586643f494c7.zip
zsh: cache expensive completions to disk
-rw-r--r--user/zsh/zshrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/user/zsh/zshrc b/user/zsh/zshrc
index e973b3a1..b2c76e1a 100644
--- a/user/zsh/zshrc
+++ b/user/zsh/zshrc
@@ -60,6 +60,9 @@ ds () {
 hash -d p=$ghq_root[0]
 hash -d go=${GOPATH:-$HOME/go}
 
+zstyle ':completion:*' use-cache on
+zstyle ':completion:*' cache-path ${XDG_CACHE_HOME:-$HOME/.cache}/zsh/completion
+
 zle -C hist-complete complete-word _generic
 zstyle ':completion:hist-complete:*' completer _history
 bindkey '\e ' hist-complete