diff options
author | Stephen <srj@thermeon.com> | 2015-01-08 16:01:16 +0000 |
---|---|---|
committer | Stephen <srj@thermeon.com> | 2015-01-08 16:01:16 +0000 |
commit | bf7b9165fd725d2bdf45ca7e639b2c91f5ef65bb (patch) | |
tree | 0aa6c7df5c990b4edce9cc83cb846661402072cb | |
parent | 175b4a807383530aa75145b5b6fdedb3ce1f11f2 (diff) | |
download | zsh-bf7b9165fd725d2bdf45ca7e639b2c91f5ef65bb.tar.gz zsh-bf7b9165fd725d2bdf45ca7e639b2c91f5ef65bb.tar.bz2 zsh-bf7b9165fd725d2bdf45ca7e639b2c91f5ef65bb.zip |
Allow custom cache dir
We are running oh-my-zsh on a shared install and the only issue is each
user having a custom cache dir. This will allow us to set the cache dir
to ZSH_CACHE_DIR=~/oh-my-zsh/cache/ .
-rw-r--r-- | lib/completion.zsh | 2 | ||||
-rw-r--r-- | oh-my-zsh.sh | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/completion.zsh b/lib/completion.zsh index 3a19a4eba..ea6139fde 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -38,7 +38,7 @@ cdpath=(.) # Use caching so that commands like apt and dpkg complete are useable zstyle ':completion::complete:*' use-cache 1 -zstyle ':completion::complete:*' cache-path $ZSH/cache/ +zstyle ':completion::complete:*' cache-path $ZSH_CACHE_DIR # Don't complete uninteresting users zstyle ':completion:*:*:*:users' ignored-patterns \ diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index d75b521c7..bc7a8e496 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -14,6 +14,13 @@ if [[ -z "$ZSH_CUSTOM" ]]; then ZSH_CUSTOM="$ZSH/custom" fi +# Set ZSH_CACHE_DIR to the path where cache files sould be created +# or else we will use the default cache/ +if [[ -z "$ZSH_CACHE_DIR" ]]; then + ZSH_CACHE_DIR="$ZSH/cache/" +fi + + # Load all of the config files in ~/oh-my-zsh that end in .zsh # TIP: Add files you don't want in git to .gitignore for config_file ($ZSH/lib/*.zsh); do |