]> git.donarmstrong.com Git - zsh.git/blobdiff - .zsh/zprofile/40_zcompile
add ~/.local/bin to PATH
[zsh.git] / .zsh / zprofile / 40_zcompile
index 4ebd4db7e58669a05b74c5d325014c1366527481..fab7d7b48f90dc1214c3e2c626be8ba4b9377d4d 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: sh -*-
 # zlogin/40_zcompile
 #
 # compile zsh snippets
@@ -5,13 +6,27 @@
 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
 # 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" ]; 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