Interesting bash prompts
Sorry I haven’t posted in a while, been busy working on many MANY things. However, I did find this which I find quite intersting
There’s some really cool bash prompts at this site:
In my opinion bash is getting quite large and a bit of a resource hog, for a shell that is; but with all it’s bloat comes some VERY decent features, including the ability to modify your prompt to run small shell scripts and display the output.
The site shows 8 simple examples; but my favorite one displays a happy “^_^” emoticon or a “O_O” emoticon if the last command succeeded or failed:
PS1=“\`if [ \$? = 0 ]; then echo \[\e[33m\]^_^\[\e[0m\]; else echo \[\e[31m\]O_O\[\e[0m\]; fi\`[\u@\h:\w]\\$ “