]> git.wh0rd.org - home.git/commitdiff
PS1: shorten slightly & add PS0 recovery
authorMike Frysinger <vapier@gentoo.org>
Fri, 12 Jun 2020 22:38:26 +0000 (18:38 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 12 Jun 2020 22:38:26 +0000 (18:38 -0400)
.profile.d/PS1.sh

index c0aa6d91c5a8bbef3bb5ca40c1a4ebc340ce8653..5f9b765baa37d6c4942c74e9a879f60c45eedf60 100644 (file)
@@ -5,8 +5,12 @@ if [ "${TERM}" != "dumb" ] ; then
                PS1+="(sdk ${SDK_BOARD} ${SDK_VERSION}) "
        fi
        # The cat here affects the exit code after this assignment.
                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'\
+       PS1+='\[\e[33m\]\u\[\e[30;1m\]@\[\e[31;1m\]\h'\
 $(cat /etc/ps1_append 2>/dev/null || :)\
 "${TARGET_PRODUCT+ {${TARGET_PRODUCT}\}}"\
 $(cat /etc/ps1_append 2>/dev/null || :)\
 "${TARGET_PRODUCT+ {${TARGET_PRODUCT}\}}"\
-'\[\e[30;1m\] \j:$? \[\e[34;1m\]\W \$\[\e[0m\] '
+'\[\e[30;1m\] \j:$? \[\e[34;1m\]\W \$\[\e[m\] '
+
+       # PS0 is displayed after the current prompt but before the command.
+       # Reset any latent colors.
+       PS0='\e[m'
 fi
 fi