3 ms·
Oh, a long time ago (but not so long as that) I got this line from a HN thread on bash tricks: export PS1="\h:\w \$(if [ \$? = 0 ]; then echo :\\\); else e
by marcosdumay 5y ago
Oh, a long time ago (but not so long as that) I got this line from a HN thread on bash tricks:
export PS1="\h:\w \$(if [ \$? = 0 ]; then echo :\\\); else echo :\\\(; fi) \$ "
It's a non-colored version of it, with a happy or sad smiley.