From e294541b61c1888f0cc7243e4e4b9e03224037b9 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 31 Oct 2011 19:39:51 +0100 Subject: [PATCH] change cache_path to use XDG_CACHE_HOME or ~/.cache --- lib/completion.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index b3cc91822..13ad8cfd8 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -43,8 +43,9 @@ hosts=( zstyle ':completion:*:hosts' hosts $hosts # Use caching so that commands like apt and dpkg complete are useable +[[ -n "$XDG_CACHE_HOME" ]] && cache_dir=$XDG_CACHE_HOME || cache_dir="$HOME/.cache" zstyle ':completion::complete:*' use-cache 1 -zstyle ':completion::complete:*' cache-path ~/.oh-my-zsh/cache/ +zstyle ':completion::complete:*' cache-path $cache_dir/oh-my-zsh/ # Don't complete uninteresting users zstyle ':completion:*:*:*:users' ignored-patterns \