Fix zsh_reload plugin to work with custom ZDOTDIR dir

This commit is contained in:
soredake 2017-01-21 04:09:04 +02:00
commit 3026022e07

View file

@ -5,9 +5,9 @@ function src()
autoload -U compinit zrecompile
compinit -d "$cache/zcomp-$HOST"
for f in ~/.zshrc "$cache/zcomp-$HOST"; do
for f in "${ZDOTDIR:-$HOME}/.zshrc" "$cache/zcomp-$HOST"; do
zrecompile -p $f && command rm -f $f.zwc.old
done
source ~/.zshrc
source "${ZDOTDIR:-$HOME}/.zshrc"
}