You've already forked inshellisense
mirror of
https://github.com/wavetermdev/inshellisense.git
synced 2026-04-22 15:25:33 -07:00
59f56fe2ee
Signed-off-by: Chapman Pendery <cpendery@vt.edu>
31 lines
646 B
Bash
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 |