X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/33004025db685f7638c2aca82c9cad379af0f940..1edf3ccaf2250a42f75b6e56db0a1df3dbcd9c23:/.zsh/zprofile/40_zcompile?ds=sidebyside diff --git a/.zsh/zprofile/40_zcompile b/.zsh/zprofile/40_zcompile index 23fd063..925c3de 100644 --- a/.zsh/zprofile/40_zcompile +++ b/.zsh/zprofile/40_zcompile @@ -9,13 +9,23 @@ # if [ -n "$ZDOTDIR" ] && [ -d "$ZDOTDIR" ]; then - rm -f $ZDOTDIR/**/*.zwc(D.N) - for f ($ZDOTDIR/*[^$ZDOTDIR/.gitignore](D.,@) $ZDOTDIR/**/*(.)) zcompile $f + 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(.N) - for f ($ZVARDIR/comp*(.)) zcompile $f + 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