Skip to content

Commit

Permalink
Use cache folder inside $ZSH, delete with unaliased rm
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella committed Apr 18, 2014
1 parent a9061f3 commit fcfa323
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions 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
}
}

0 comments on commit fcfa323

Please sign in to comment.