ZSH_CACHE_DIR should respect XDG_CACHE_HOME first

This commit is contained in:
Monson Shao 2020-04-06 18:04:00 +08:00
parent 6ad6fea52a
commit 5d3f8bcc9f
No known key found for this signature in database
GPG key ID: 163271C707982C65

View file

@ -1,7 +1,7 @@
# Set ZSH_CACHE_DIR to the path where cache files should be created
# or else we will use the default cache/
if [[ -z "$ZSH_CACHE_DIR" ]]; then
ZSH_CACHE_DIR="$ZSH/cache"
ZSH_CACHE_DIR=${XDG_CACHE_HOME:-"$ZSH/cache"}
fi
# Migrate .zsh-update file to $ZSH_CACHE_DIR