Dorward

Smiley Prompt

09 January 2006

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\$ "