zsh_reload.plugin.zsh 269 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
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
  done
  source ~/.zshrc
}