From 2f24b0aebdd38599256c21b82ee7b39fe5ad0963 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 16 Sep 2008 17:56:27 +0200 Subject: [PATCH 1/1] First load the zsh file for this hostname, then (env|rc).local. --- zsh/env | 10 +++++----- zsh/rc | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/zsh/env b/zsh/env index 801b237..37b1467 100644 --- a/zsh/env +++ b/zsh/env @@ -11,11 +11,11 @@ export EDITOR=vim export PAGER=less -# If an env.local file exists load it, otherwise load an env file for the -# current hostname (first part before a dot) if it exists. +# If an env file for the current hostname (first part before a dot) exists load +# it, otherwise load env.local if available. host=${$(hostname)//.*/} -if [[ -f ~/.zsh/env.local ]]; then; - source ~/.zsh/env.local -elif [[ -f ~/.zsh/env.$host ]]; then; +if [[ -f ~/.zsh/env.$host ]]; then; source ~/.zsh/env.$host +elif [[ -f ~/.zsh/env.local ]]; then; + source ~/.zsh/env.local fi diff --git a/zsh/rc b/zsh/rc index 18ffa0c..5d20a45 100644 --- a/zsh/rc +++ b/zsh/rc @@ -95,11 +95,11 @@ function ll() { } -# 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. +# If a rc file for the current hostname (first part before a dot) exists load +# it, otherwise load rc.local if available. host=${$(hostname)//.*/} -if [[ -f ~/.zsh/rc.local ]]; then; - source ~/.zsh/rc.local -elif [[ -f ~/.zsh/rc.$host ]]; then; +if [[ -f ~/.zsh/rc.$host ]]; then; source ~/.zsh/rc.$host +elif [[ -f ~/.zsh/rc.local ]]; then; + source ~/.zsh/rc.local fi -- 2.44.2