Dorward's Ramblings

Smiley Prompt

Published on

Via Linux Gazette, I now have a smiley in my prompt that indicates the exit status of the previous command.

smiley () { if [ $? == 0 ]; then echo ':)';else echo ':(';fi; }
PS1="\$(smiley) \u@\h:\w\$ "