X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/da9cf680958b6880f61acd01436b41716092f235..630e225d73f2417de8e491d6b35df4ae5394654a:/.zsh/zprofile/40_zcompile diff --git a/.zsh/zprofile/40_zcompile b/.zsh/zprofile/40_zcompile index 1d9718f..eb6abb5 100644 --- a/.zsh/zprofile/40_zcompile +++ b/.zsh/zprofile/40_zcompile @@ -5,18 +5,27 @@ # Copyright © 1994–2008 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # -# Source repository: http://git.madduck.net/v/etc/zsh.git +# Source repository: git://git.madduck.net/etc/zsh.git # if [ -n "$ZDOTDIR" ] && [ -d "$ZDOTDIR" ]; then - rm -f $ZDOTDIR/**/*.zwc(D.N) - for f ($ZDOTDIR/*(D.,@) $ZDOTDIR/**/*(.)) \ - [[ $f:t != .gitignore ]] && 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*(.N)) 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