From 49972b75fa78383c64a59e264128024e559380d9 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Thu, 29 Aug 2024 23:37:14 -0500 Subject: [PATCH] refactor(hm/price): ensure `zcompdump` gets put under $XDG_CACHE_HOME --- users/price/conf/zsh/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/users/price/conf/zsh/default.nix b/users/price/conf/zsh/default.nix index 5e7cd845..818a80e3 100644 --- a/users/price/conf/zsh/default.nix +++ b/users/price/conf/zsh/default.nix @@ -1,8 +1,13 @@ -{ ... }: +{ config, ... }: { programs.zsh = { enable = true; enableCompletion = true; initExtra = builtins.readFile ./init-extra.zsh; + completionInit = + let + zsh-cache-dir = "${config.xdg.cacheHome}/zsh"; + in + "mkdir -p ${zsh-cache-dir} && autoload -U compinit && compinit -d ${zsh-cache-dir}/zcompdump-$ZSH_VERSION"; }; }