X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/b9574517452ddcb25f147833da0f7f3d03dbd2a3..c3bb27de5d481b62b216517098064472dd11b9c6:/.zsh/zprofile/40_zcompile diff --git a/.zsh/zprofile/40_zcompile b/.zsh/zprofile/40_zcompile index 967199a..925c3de 100644 --- a/.zsh/zprofile/40_zcompile +++ b/.zsh/zprofile/40_zcompile @@ -8,10 +8,24 @@ # Source repository: http://git.madduck.net/v/etc/zsh.git # -if [ -n "$ZDOTDIR" ]; then - rm -f $ZDOTDIR/**/*.zwc(.N) $ZDOTDIR/**/.*.zwc(.N) $ZVARDIR/**/*.zwc(.N) - for f ($ZDOTDIR/.*(@) $ZDOTDIR/*(.) $ZDOTDIR/**/*(.) $ZVARDIR/comp-$HOST) \ +if [ -n "$ZDOTDIR" ] && [ -d "$ZDOTDIR" ]; then + rm -f $ZDOTDIR/**/*.zwc{,.old}(D.N) + for f in $ZDOTDIR/*(D.,@) $ZDOTDIR/**/*(.); do + case "$f:t" in + .gitignore|.*.sw?) continue;; + esac zcompile $f + done +fi + +if [ -n "$ZVARDIR" ] && [ -d "$ZVARDIR" ]; then + rm -f $ZVARDIR/**/*.zwc{,.old}(.N) + for f in $ZVARDIR/comp*(.N); do + case "$f:t" in + .gitignore|.*.sw?) continue;; + esac + zcompile $f + done fi # vim:ft=zsh