From fcfa323974985cd202c95379f893a86d6cf975fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 25 Mar 2014 22:16:36 +0100 Subject: [PATCH] Use cache folder inside $ZSH, delete with unaliased rm --- plugins/zsh_reload/zsh_reload.plugin.zsh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/zsh_reload/zsh_reload.plugin.zsh b/plugins/zsh_reload/zsh_reload.plugin.zsh index a435dbc8d..94945bd48 100644 --- a/plugins/zsh_reload/zsh_reload.plugin.zsh +++ b/plugins/zsh_reload/zsh_reload.plugin.zsh @@ -1,13 +1,12 @@ -zsh_cache=$HOME/.zsh_cache -mkdir -p $zsh_cache - # reload zshrc function src() { autoload -U compinit zrecompile - compinit -d $zsh_cache/zcomp-$HOST - for f in $HOME/.zshrc $zsh_cache/zcomp-$HOST; do - zrecompile -p $f && rm -f $f.zwc.old + compinit -d "$ZSH/cache/zcomp-$HOST" + + for f in ~/.zshrc "$ZSH/cache/zcomp-$HOST"; do + zrecompile -p $f && command rm -f $f.zwc.old done + source ~/.zshrc -} \ No newline at end of file +}