]> git.wh0rd.org Git - home.git/commitdiff
PS1.sh: make it a bit more readable and support android target info
authorMike Frysinger <vapier@gentoo.org>
Tue, 7 Feb 2017 17:14:20 +0000 (12:14 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 7 Feb 2017 17:14:20 +0000 (12:14 -0500)
.profile.d/PS1.sh

index 55f7718604e9b40d415da873a70818900374420d..6407b9322304f7f0ec56d78772c646506388c3db 100644 (file)
@@ -5,5 +5,8 @@ if [ "${TERM}" != "dumb" ] ; 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 || :)'\[\e[30;1m\] \j:$? \[\e[34;1m\]\W \$\[\e[0m\] '
+       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