From b6080a6d29309e1fa007bedc2442e65f04066e34 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 16 Aug 2019 14:52:11 +1200 Subject: Include ~/.bash_profile.d snippets if present --- bash/bash_profile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bash/bash_profile b/bash/bash_profile index 1f5a633a..2f3ba81f 100644 --- a/bash/bash_profile +++ b/bash/bash_profile @@ -10,6 +10,13 @@ if [ -n "$POSIXLY_CORRECT" ] ; then return fi +# Load any supplementary scripts in ~/.bash_profile.d; it need not exist +for bash in "$HOME"/.bash_profile.d/*.bash ; do + [ -e "$bash" ] || continue + . "$bash" +done +unset -v bash + # If ~/.bashrc exists, source that too; the tests for both interactivity and # minimum version numbers are in there if [ -f "$HOME"/.bashrc ] ; then -- cgit v1.2.3