From 5d3f8bcc9f3ee1271c673d2a9f4d5ea1810e5197 Mon Sep 17 00:00:00 2001 From: Monson Shao Date: Mon, 6 Apr 2020 18:04:00 +0800 Subject: [PATCH] ZSH_CACHE_DIR should respect XDG_CACHE_HOME first --- oh-my-zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 30259372c..9851a0b36 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -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