X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/ef497cfeb02b64775e838ef294d41576b10c0920..18893ab887e52bf73e7826771665a7d515823e8d:/.zsh/zprofile/40_zcompile?ds=inline diff --git a/.zsh/zprofile/40_zcompile b/.zsh/zprofile/40_zcompile index b3a3e26..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 - command rm -f $ZDOTDIR/**/*.zwc(.N) $ZDOTDIR/**/.*.zwc(.N) ZVAR/**/*.zwc(.N) - for f ($ZDOTDIR/.*(@) $ZDOTDIR/*(.) $ZDOTDIR/**/*(.) $ZVAR/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