aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-17 19:02:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-17 19:02:36 +1200
commitb3d54e5fd6ba68a5833daf2017830300b72e1004 (patch)
treeb418b4a5628e55ffc3d131e93c29e3f461e3cfce /bash/bashrc
parentMove interactive tests back into *rc files (diff)
downloaddotfiles-b3d54e5fd6ba68a5833daf2017830300b72e1004.tar.gz
dotfiles-b3d54e5fd6ba68a5833daf2017830300b72e1004.zip
Source ~/.shrc.d in Bash if not login shell
Diffstat (limited to 'bash/bashrc')
-rw-r--r--bash/bashrc12
1 files changed, 12 insertions, 0 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 5b04f979..e719efee 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -106,6 +106,18 @@ if [[ $COMP_WORDBREAKS ]] ; then
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
fi
+# If this wasn't a login shell, load in the POSIX shell functions
+case $- in
+ *l*) ;;
+ *)
+ for shrc in "$HOME"/.shrc.d/*.sh ; do
+ [[ -e $shrc ]] || continue
+ source "$shrc"
+ done
+ unset -v shrc
+ ;;
+esac
+
# Load any supplementary scripts
for bashrc in "$HOME"/.bashrc.d/*.bash ; do
[[ -e $bashrc ]] || continue