From 30a4d2d3feb5a903cf0b320d7226c9f4049842cb Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Sep 2013 15:24:04 -0400 Subject: [PATCH 1/1] PS1.sh: support chrome-sdk env --- .profile.d/PS1.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.profile.d/PS1.sh b/.profile.d/PS1.sh index e76123d..082fdb1 100644 --- a/.profile.d/PS1.sh +++ b/.profile.d/PS1.sh @@ -1 +1,7 @@ -[ "${TERM}" != "dumb" ] && PS1='\[\e[0;33m\]\u\[\e[30;1m\]@\[\e[31;1m\]\h'$([ -e /etc/ps1_append ] && cat /etc/ps1_append)'\[\e[30;1m\] \j:$? \[\e[34;1m\]\W \$\[\e[0m\] ' +if [ "${TERM}" != "dumb" ] ; then + PS1= + if [ -n "${SDK_VERSION}" ] ; then + PS1+="(sdk ${SDK_BOARD} ${SDK_VERSION}) " + fi + PS1+='\[\e[0;33m\]\u\[\e[30;1m\]@\[\e[31;1m\]\h'$(cat /etc/ps1_append 2>/dev/null)'\[\e[30;1m\] \j:$? \[\e[34;1m\]\W \$\[\e[0m\] ' +fi -- 2.39.2