Best Bash Prompt Ever

Ever wish your command line was a little more friendly? Maybe you’d like to add some emotion to your static computing environment? I give you the smiley face bash prompt!

Font is terminus, btw.

This bash prompt displays a green smiley face or a red frowny face depending on the return status of the last command executed. To use it, insert the following code to the end of your ~/.bashrc file:

PS1=”\[\e[01;32m\]\u@\h \[\e[01;34m\]\W \`if [ \$? = 0 ]; then echo -e ‘\[\e[01;32m\]:)’; else echo -e ‘\[\e[01;31m\]:(‘; fi\` \[\e[01;34m\]$\[\e[00m\]”

Happy (or sad) computing!

Tags: , , , , , ,

This entry was posted on Thursday, September 2nd, 2010 at 8:21 pm and is filed under Linux, Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

3 Responses to “Best Bash Prompt Ever”

  1. tall blonde girl says:

    post more

  2. Andre says:

    this. is. awesome!

Leave a Reply