From 7650be35b5fa3b8f5d5db64d9d9035e30ac40e80 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 7 Apr 2015 11:56:57 -0700 Subject: [PATCH] PS1.sh: fix exit code --- .profile.d/PS1.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.profile.d/PS1.sh b/.profile.d/PS1.sh index 082fdb1..71364e3 100644 --- a/.profile.d/PS1.sh +++ b/.profile.d/PS1.sh @@ -3,5 +3,6 @@ if [ "${TERM}" != "dumb" ] ; then 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\] ' + # 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 || :)'\[\e[30;1m\] \j:$? \[\e[34;1m\]\W \$\[\e[0m\] ' fi -- 2.39.5