set -o vi
-# 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=$(echo $(hostname) | sed -e 's/\..*$//')
-if [ -f ~/.bash/rc.local ]; then
- source ~/.bash/rc.local
-elif [ -f ~/.bash/rc.$host ]; then
+if [ -f ~/.bash/rc.$host ]; then
source ~/.bash/rc.$host
+elif [ -f ~/.bash/rc.local ]; then
+ source ~/.bash/rc.local
fi