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 \