Diff
1diff --git a/lib/completion.zsh b/lib/completion.zsh
2index 3a19a4eba17a99faf2481a85110bea4f5937b9e7..ea6139fde2ad8d83952be42f4c33347423ebcc87 100644
3--- a/lib/completion.zsh
4+++ b/lib/completion.zsh
5@@ -38,7 +38,7 @@ cdpath=(.)
6
7 # Use caching so that commands like apt and dpkg complete are useable
8 zstyle ':completion::complete:*' use-cache 1
9-zstyle ':completion::complete:*' cache-path $ZSH/cache/
10+zstyle ':completion::complete:*' cache-path $ZSH_CACHE_DIR
11
12 # Don't complete uninteresting users
13 zstyle ':completion:*:*:*:users' ignored-patterns \
14diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
15index d75b521c76c0e2192f42d92b709bbe414b22998f..bc7a8e4966426a5f0f43c34153b7c5dbfac8240b 100644
16--- a/oh-my-zsh.sh
17+++ b/oh-my-zsh.sh
18@@ -14,6 +14,13 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
19 ZSH_CUSTOM="$ZSH/custom"
20 fi
21
22+# Set ZSH_CACHE_DIR to the path where cache files sould be created
23+# or else we will use the default cache/
24+if [[ -z "$ZSH_CACHE_DIR" ]]; then
25+ ZSH_CACHE_DIR="$ZSH/cache/"
26+fi
27+
28+
29 # Load all of the config files in ~/oh-my-zsh that end in .zsh
30 # TIP: Add files you don't want in git to .gitignore
31 for config_file ($ZSH/lib/*.zsh); do
32diff --git a/plugins/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh
33index bc36c80db9e9e325059cc3112ca4ae49b8c3429d..e472578b0eaa85b9c9f58b3dc3261a30d999a4b6 100644
34--- a/plugins/last-working-dir/last-working-dir.plugin.zsh
35+++ b/plugins/last-working-dir/last-working-dir.plugin.zsh
36@@ -4,8 +4,8 @@
37
38 # Flag indicating if we've previously jumped to last directory.
39 typeset -g ZSH_LAST_WORKING_DIRECTORY
40-mkdir -p "$ZSH/cache"
41-local cache_file="$ZSH/cache/last-working-dir"
42+mkdir -p $ZSH_CACHE_DIR
43+local cache_file="$ZSH_CACHE_DIR/last-working-dir"
44
45 # Updates the last directory once directory is changed.
46 function chpwd() {
47diff --git a/plugins/zsh_reload/zsh_reload.plugin.zsh b/plugins/zsh_reload/zsh_reload.plugin.zsh
48index 3f44b99c637d5bd25f3e7d19e73952f9c1e84551..cde9ebeca7b66a5f9dcb72d957bc761843b6ccb1 100644
49--- a/plugins/zsh_reload/zsh_reload.plugin.zsh
50+++ b/plugins/zsh_reload/zsh_reload.plugin.zsh
51@@ -1,7 +1,7 @@
52 # reload zshrc
53 function src()
54 {
55- local cache="$ZSH/cache"
56+ local cache=$ZSH_CACHE_DIR
57 autoload -U compinit zrecompile
58 compinit -d "$cache/zcomp-$HOST"
59