X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=.profile.d%2FPS1.sh;h=c0aa6d91c5a8bbef3bb5ca40c1a4ebc340ce8653;hb=853a0c1f76ed7cb7e9bd6619b9e58b38cca1a1f0;hp=943263541cf7a60f24fefe3e6c6d48cbed7adbb5;hpb=46fd861adb0799a17e77bc9e8f181674d1b4cd1e;p=home.git diff --git a/.profile.d/PS1.sh b/.profile.d/PS1.sh index 9432635..c0aa6d9 100644 --- a/.profile.d/PS1.sh +++ b/.profile.d/PS1.sh @@ -1 +1,12 @@ -PS1='\[\e[0;33m\]\u\[\e[30;1m\]@\[\e[31;1m\]\h'`cat /etc/ps1_append`'\[\e[30;1m\] \j:$? \[\e[34;1m\]\W \$\[\e[0m\] ' +if [ "${TERM}" != "dumb" ] ; then + # Set the terminal's window title. + PS1='\[\e(B\017\e]0;\u@\h \w\007\]' + if [ -n "${SDK_VERSION}" ] ; then + PS1+="(sdk ${SDK_BOARD} ${SDK_VERSION}) " + fi + # The cat here affects the exit code after this assignment. + PS1+='\[\e[0;33m\]\u\[\e[30;1m\]@\[\e[31;1m\]\h'\ +$(cat /etc/ps1_append 2>/dev/null || :)\ +"${TARGET_PRODUCT+ {${TARGET_PRODUCT}\}}"\ +'\[\e[30;1m\] \j:$? \[\e[34;1m\]\W \$\[\e[0m\] ' +fi