From 823724efd9957abdfa3a405e601a16601649a011 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sat, 11 Feb 2012 17:21:54 -0600 Subject: [PATCH] Include ~/.bash_profile.d and ~/.bashrc.d when loading subfiles --- bash-config/common | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bash-config/common b/bash-config/common index e34f1c3..a0e9c45 100644 --- a/bash-config/common +++ b/bash-config/common @@ -9,7 +9,15 @@ then _i() { [[ $- == *i* ]]; return $?; } # Include all subfiles, in lexicographical order - eval $(find "${_base}/${_self}.d/" -type f | sort | sed -e 's/^/source /; s/$/;/') + eval "$( + ( + [ -d "${_base}/${_self}.d/" ] && echo "${_base}/${_self}.d/" + [ -d "${HOME}/.${_self}.d/" ] && echo "${HOME}/.${_self}.d/" + ) | while read _path + do + find ${_path} -type f | sort + done | sed -e 's/^/source /; s/$/;/' + )" unset _base _self _i fi -- 2.42.0