From c3984a775994645b8fb9ef7f714a92edb7baf5ac Mon Sep 17 00:00:00 2001 From: Ville Lautanala Date: Fri, 28 Feb 2020 21:01:14 +0200 Subject: [PATCH] fasd: cache full fasd initialisation script (#6097) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using `fasd —-init auto` will first detect terminal and then call fasd again to generate the final initialisation script. Caching that gives a more significant performance boost. --- plugins/fasd/fasd.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/fasd/fasd.plugin.zsh b/plugins/fasd/fasd.plugin.zsh index ec2e5183a..cdf99708c 100644 --- a/plugins/fasd/fasd.plugin.zsh +++ b/plugins/fasd/fasd.plugin.zsh @@ -1,7 +1,8 @@ if [ $commands[fasd] ]; then # check if fasd is installed fasd_cache="${ZSH_CACHE_DIR}/fasd-init-cache" if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then - fasd --init auto >| "$fasd_cache" + fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install \ + zsh-wcomp zsh-wcomp-install >| "$fasd_cache" fi source "$fasd_cache" unset fasd_cache