From: Mike Frysinger Date: Mon, 16 Sep 2013 19:24:04 +0000 (-0400) Subject: PS1.sh: support chrome-sdk env X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=30a4d2d3feb5a903cf0b320d7226c9f4049842cb;p=home.git PS1.sh: support chrome-sdk env --- 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