summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorncanceill <nicolas.canceill@ens-cachan.org>2014-04-25 00:48:37 +0200
committerncanceill <nicolas.canceill@ens-cachan.org>2014-07-16 12:27:01 +0200
commit7478b754a1e53a6c058d7807700869474b68bb21 (patch)
tree6552d00f94c10627163f60bac079702793512f53
parent5756ea0101dc60f5c5d3874a4a5baf58647aec9d (diff)
downloadzsh-7478b754a1e53a6c058d7807700869474b68bb21.tar.gz
zsh-7478b754a1e53a6c058d7807700869474b68bb21.tar.bz2
zsh-7478b754a1e53a6c058d7807700869474b68bb21.zip
make sure cache dir exists, just like log dir
-rw-r--r--cache/.easter-egg4
-rw-r--r--plugins/zsh_reload/zsh_reload.plugin.zsh5
2 files changed, 7 insertions, 2 deletions
diff --git a/cache/.easter-egg b/cache/.easter-egg
new file mode 100644
index 000000000..4b6164edb
--- /dev/null
+++ b/cache/.easter-egg
@@ -0,0 +1,4 @@
+This file is only here so that Git will keep a cache directory as .gitignore is ignoring all the files within it.
+
+Feel free to add love notes for people here.
+
diff --git a/plugins/zsh_reload/zsh_reload.plugin.zsh b/plugins/zsh_reload/zsh_reload.plugin.zsh
index 94945bd48..3f44b99c6 100644
--- a/plugins/zsh_reload/zsh_reload.plugin.zsh
+++ b/plugins/zsh_reload/zsh_reload.plugin.zsh
@@ -1,10 +1,11 @@
# reload zshrc
function src()
{
+ local cache="$ZSH/cache"
autoload -U compinit zrecompile
- compinit -d "$ZSH/cache/zcomp-$HOST"
+ compinit -d "$cache/zcomp-$HOST"
- for f in ~/.zshrc "$ZSH/cache/zcomp-$HOST"; do
+ for f in ~/.zshrc "$cache/zcomp-$HOST"; do
zrecompile -p $f && command rm -f $f.zwc.old
done