http://linuxgazette.net/122/lg_tips.html#tips.1
Check out my latest toy:
:) compost$ ls foo bar baz :) compost$ blarf bash: blarf: command not found :( 127 compost$
Here’s What’s in my ~/.bashrc:
smiley() {
err=$?
if [ $err == 0 ]
then echo ":)"
else echo ":( $err"
fi
}
PS1="\$(smiley) \h\\$ "
This reminds me of the face that reports your remaining health percentage in the original version of “Doom”…
(Well, ok, so that was an XDoom screen capture)
I can’t believe I never thought to do this. You had me laughing for five minutes tonight. I might have to put it in /etc/profile on a few systems.
Comment by yDNA — January 7, 2006 @ 10:46 pm UTC