c3984a775994645b8fb9ef7f714a92edb7baf5ac

Author
Ville Lautanala <lautis@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

fasd: cache full fasd initialisation script (#6097)

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.

Diff

 1diff --git a/plugins/fasd/fasd.plugin.zsh b/plugins/fasd/fasd.plugin.zsh
 2index ec2e5183a8347c5d33c74fac81c26c4b8201bf15..cdf99708c548eeaa313406611551225483ab7609 100644
 3--- a/plugins/fasd/fasd.plugin.zsh
 4+++ b/plugins/fasd/fasd.plugin.zsh
 5@@ -1,7 +1,8 @@
 6 if [ $commands[fasd] ]; then # check if fasd is installed
 7   fasd_cache="${ZSH_CACHE_DIR}/fasd-init-cache"
 8   if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
 9-    fasd --init auto >| "$fasd_cache"
10+    fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install \
11+      zsh-wcomp zsh-wcomp-install >| "$fasd_cache"
12   fi
13   source "$fasd_cache"
14   unset fasd_cache