From b3d54e5fd6ba68a5833daf2017830300b72e1004 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 17 Aug 2016 19:02:36 +1200 Subject: Source ~/.shrc.d in Bash if not login shell --- bash/bashrc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bash/bashrc') 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 -- cgit v1.2.3