diff options
author | Goose <52642831+rekaerst@users.noreply.github.com> | 2020-10-01 21:44:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 15:44:59 +0200 |
commit | 1617f4ffafd6114fb3ccbdbb782eeaf25a7f2905 (patch) | |
tree | d62f5fd448a7d20dbababf2d94fdc584efb4395d /plugins/pip | |
parent | f776af2a1f5d5ced17bdeb00f7adb64ccfaa99a6 (diff) | |
download | zsh-1617f4ffafd6114fb3ccbdbb782eeaf25a7f2905.tar.gz zsh-1617f4ffafd6114fb3ccbdbb782eeaf25a7f2905.tar.bz2 zsh-1617f4ffafd6114fb3ccbdbb782eeaf25a7f2905.zip |
pip: move plugin cache to XDG folder (#9299)
Diffstat (limited to 'plugins/pip')
-rw-r--r-- | plugins/pip/pip.plugin.zsh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/pip/pip.plugin.zsh b/plugins/pip/pip.plugin.zsh index aaae90185..a46e7658c 100644 --- a/plugins/pip/pip.plugin.zsh +++ b/plugins/pip/pip.plugin.zsh @@ -9,7 +9,11 @@ # If you would like to clear your cache, go ahead and do a # "zsh-pip-clear-cache". -ZSH_PIP_CACHE_FILE=~/.pip/zsh-cache +if [[ -d "${XDG_CACHE_HOME:-$HOME/.cache}/pip" ]]; then + ZSH_PIP_CACHE_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/pip/zsh-cache" +else + ZSH_PIP_CACHE_FILE=~/.pip/zsh-cache +fi ZSH_PIP_INDEXES=(https://pypi.org/simple/) zsh-pip-clear-cache() { |