]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - zsh/rc
Added the possibility to automatically load configuration files.
[config/dotfiles.git] / zsh / rc
diff --git a/zsh/rc b/zsh/rc
index 298cab3b8e4c44772e343666affa9f22b51cb285..b7c4f00522feccb372d78ecd884d2c95d1f1cc38 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -53,3 +53,13 @@ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
 
 # Enable zsh's extended glob abilities.
 setopt  extendedglob
+
+
+# If a rc.local file exists load it, otherwise load a rc file for the current
+# hostname (first part before a dot) if it exists.
+host=${$(hostname)//.*/}
+if [[ -f ~/.zsh/rc.local ]]; then;
+    source ~/.zsh/rc.local
+elif [[ -f ~/.zsh/rc.$host ]]; then;
+    source ~/.zsh/rc.$host
+fi