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 +}