From 6ae5684f467b6b4fe9169d0bafd9f767317fa859 Mon Sep 17 00:00:00 2001 From: Egidio Caprino Date: Thu, 6 Jul 2017 19:18:05 +0100 Subject: [PATCH] Create Fasd cache file in user home directory If oh-my-zsh is installed globally, ZSH_CACHE_DIR may point to a directory which is not writable by the user or which is shared amog all the users. For example, in Arch Linux, it is pointing to /usr/share/oh-my-zsh. This fix will create Fasd cache file as hidden in his home directory. --- plugins/fasd/fasd.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/fasd/fasd.plugin.zsh b/plugins/fasd/fasd.plugin.zsh index 2c302f74..124be040 100644 --- a/plugins/fasd/fasd.plugin.zsh +++ b/plugins/fasd/fasd.plugin.zsh @@ -1,5 +1,5 @@ if [ $commands[fasd] ]; then # check if fasd is installed - fasd_cache="${ZSH_CACHE_DIR}/fasd-init-cache" + fasd_cache="~/.fasd-init-cache" if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then fasd --init auto >| "$fasd_cache" fi