X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/d789c258ab9b1764f6bcf8fd30b583efab2a0381..e45b0db3d66ca9e041622db3d801d026fb4d3724:/.zsh/zprofile/40_zcompile diff --git a/.zsh/zprofile/40_zcompile b/.zsh/zprofile/40_zcompile index 174a757..ebc4ee7 100644 --- a/.zsh/zprofile/40_zcompile +++ b/.zsh/zprofile/40_zcompile @@ -2,7 +2,7 @@ # # compile zsh snippets # -# Copyright © 1994–2008 martin f. krafft +# Copyright © 1994–2017 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # # Source repository: http://git.madduck.net/v/etc/zsh.git @@ -10,13 +10,22 @@ if [ -n "$ZDOTDIR" ] && [ -d "$ZDOTDIR" ]; then rm -f $ZDOTDIR/**/*.zwc{,.old}(D.N) - for f ($ZDOTDIR/*(D.,@) $ZDOTDIR/**/*(.)) \ - [[ $f:t != .gitignore ]] && zcompile $f + 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 ($ZVARDIR/comp*(.N)) zcompile $f + for f in $ZVARDIR/comp*(.N); do + case "$f:t" in + .gitignore|.*.sw?) continue;; + esac + zcompile $f + done fi # vim:ft=zsh