From 59f56fe2ee7bf1b89a334abce86ed6098a40eeac Mon Sep 17 00:00:00 2001 From: Chapman Pendery <35637443+cpendery@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:34:53 -0800 Subject: [PATCH] fix: add in missing sourcing for bash's shell integration (#102) Signed-off-by: Chapman Pendery --- shell/shellIntegration.bash | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/shell/shellIntegration.bash b/shell/shellIntegration.bash index 4ab8320..1aa3b1e 100644 --- a/shell/shellIntegration.bash +++ b/shell/shellIntegration.bash @@ -1,3 +1,17 @@ +if [ -r ~/.bashrc ]; then + . ~/.bashrc +fi +if [ -r /etc/profile ]; then + . /etc/profile +fi +if [ -r ~/.bash_profile ]; then + . ~/.bash_profile +elif [ -r ~/.bash_login ]; then + . ~/.bash_login +elif [ -r ~/.profile ]; then + . ~/.profile +fi + __is_prompt_start() { builtin printf '\e]6973;PS\a' } @@ -10,7 +24,7 @@ __is_update_prompt() { if [[ "$__is_custom_PS1" == "" || "$__is_custom_PS1" != "$PS1" ]]; then __is_original_PS1=$PS1 __is_custom_PS1="\[$(__is_prompt_start)\]$__is_original_PS1\[$(__is_prompt_end)\]" - PS1="$__is_custom_PS1" + export PS1="$__is_custom_PS1" fi }