From bccd85ccb4b4b3fa157ce3f7de28e916e8d534ba Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Wed, 14 Dec 2022 14:52:35 -0800 Subject: [PATCH] Add support for post-.bash_profile and .bashrc scripts --- src/.bash_profile | 5 +++++ src/.bashrc | 6 ++++++ src/.shellcheckrc | 1 + 3 files changed, 12 insertions(+) diff --git a/src/.bash_profile b/src/.bash_profile index d24a9e3..4d0ccce 100755 --- a/src/.bash_profile +++ b/src/.bash_profile @@ -78,5 +78,10 @@ if [ -z "$SSH_AUTH_SOCK" ]; then eval "$(ssh-agent -s)" fi +# source post-bash_profile script (if present) +if [ -f ~/.bash_profile.after ]; then + . ~/.bash_profile.after +fi + # if running interactively, source .bashrc [ -n "$PS1" ] && source "$HOME/.bashrc" diff --git a/src/.bashrc b/src/.bashrc index 3d8b116..e3f4f4f 100755 --- a/src/.bashrc +++ b/src/.bashrc @@ -628,3 +628,9 @@ PS1+='\n' PS1+='\[$(_ps1_color preprompt)\]\$\[$(_ps1_color prompt)\] ' PS2='\[$(_ps1_color preprompt)\]>\[$(_ps1_color prompt)\] ' PROMPT_COMMAND="_bashrc_prompt_command" + + +# source post-bashrc script (if present) +if [ -f ~/.bashrc.after ]; then + . ~/.bashrc.after +fi diff --git a/src/.shellcheckrc b/src/.shellcheckrc index 1b57586..9b55032 100644 --- a/src/.shellcheckrc +++ b/src/.shellcheckrc @@ -1,2 +1,3 @@ # ignore "Not following" errors; they usually can't be automatically resolved +disable=SC1090 disable=SC1091