Best Bash Prompt Ever

🖊️ 🔖 Linux Technology 💬 3

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!

[caption id=”attachment_441” align=”alignnone” width=”495” caption=”Font is terminus, btw.”][/caption]

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!


anonymous
this. is. awesome!
anonymous  in response to anonymous
Something about kittens and cute things?
anonymous
post more