Files
inshellisense/shell/shellIntegration.bash
T
2023-12-05 12:34:53 -08:00

31 lines
646 B
Bash

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'
}
__is_prompt_end() {
builtin printf '\e]6973;PE\a'
}
__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)\]"
export PS1="$__is_custom_PS1"
fi
}
__is_update_prompt