1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 05:40:08 +00:00

Add zsh_reload which provides src function, this function will source .zshrc and rebuilds cache

This commit is contained in:
Wael Nasreddine 2011-10-20 13:10:20 +02:00
parent 757fa3314d
commit 40508b79a4

View file

@ -0,0 +1,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
}