diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-17 19:02:36 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-17 19:02:36 +1200 |
commit | b3d54e5fd6ba68a5833daf2017830300b72e1004 (patch) | |
tree | b418b4a5628e55ffc3d131e93c29e3f461e3cfce /bash | |
parent | Move interactive tests back into *rc files (diff) | |
download | dotfiles-b3d54e5fd6ba68a5833daf2017830300b72e1004.tar.gz dotfiles-b3d54e5fd6ba68a5833daf2017830300b72e1004.zip |
Source ~/.shrc.d in Bash if not login shell
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc | 12 |
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 |