From 70da59dbfa67d201d2c58c656e24f28d216d83bf Mon Sep 17 00:00:00 2001
From: Alexander Sulfrian <alexander@sulfrian.net>
Date: Sun, 5 Jul 2009 23:00:54 +0200
Subject: changed wildcard load

---
 bashrc/main.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'bashrc/main.sh')

diff --git a/bashrc/main.sh b/bashrc/main.sh
index 0982f6e..e967e53 100644
--- a/bashrc/main.sh
+++ b/bashrc/main.sh
@@ -62,10 +62,16 @@ _load() {
 		esac
 	fi
 
-	if [[ -r ${base}/${path} || ($1 == "node" && $2 == "*") ]]; then
-		source ${base}/${path} 2>&1 > /dev/null
+	if [[ -r ${base}/${path} ]]; then
+	    source ${base}/${path} 2>&1 > /dev/null
+	elif [[ $1 == "node" && $2 == "*" ]]; then
+	    for file in ${base}/${path}; do
+		if [[ -r $file ]]; then
+		    source $file 2>&1 > /dev/null
+		fi
+	    done
 	elif [[ ${pedantic} -eq 1 ]]; then
-		echo "error: cannot find necessary startup file: ${base}/${path}"
+	    echo "error: cannot find necessary startup file: ${base}/${path}"
 	fi
 }
 
-- 
cgit v1.2.3