]> git.donarmstrong.com Git - zsh.git/blobdiff - .zsh/rcsstub
add zsh modes to everything
[zsh.git] / .zsh / rcsstub
index b7c3f8323f276e7abd2e163e6683f3896f1a2b61..10e652a90b0675f4cd8d63b121ed5e978fe90687 100644 (file)
@@ -1,24 +1,31 @@
-# .zshenv
+# -*- mode: sh -*-
+# rcsstub
 #
-# Actual .zshenv file
+# Stub for all .z* files; actual content comes from a directory
 #
 # 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
 #
 
-. $ZDOTDIR/logging
-. $ZDOTDIR/util
-
 if [[ -o rcs ]]; then
-  __do_debug && set -x
+  source $ZDOTDIR/logging
+  source $ZDOTDIR/util
+  source $ZDOTDIR/sourcedir
+
+#  __do_debug && set -x || :
+
+  _DIR=$ZDOTDIR/${${(%):-%1N}#.}
+  sourcedir $_DIR
+
+  if [[ -d $_DIR/parts.d ]]; then
+    sourcedir $_DIR/parts.d
+  fi
 
-  file="$(print -P %1N)"
-  . $ZDOTDIR/sourcedir
-  sourcedir $ZDOTDIR/${file#.}
+  unset _DIR
 
-  __do_debug && set +x
+#  __do_debug && set +x || :
 fi
 
 # vim:ft=zsh