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.
This commit is contained in:
parent
d848c94804
commit
6ae5684f46
@ -1,5 +1,5 @@
|
|||||||
if [ $commands[fasd] ]; then # check if fasd is installed
|
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
|
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
|
||||||
fasd --init auto >| "$fasd_cache"
|
fasd --init auto >| "$fasd_cache"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user