Put this in your .bashrc, and the current directory in your PS1 will be printed green if the previous command had exit state 0, red otherwise. No more typing 'echo $?', ' && echo ok', '|| echo failed' etc on the command line.
::Read from here
( Inspired by this post )
posted on Tuesday, 14 Oct 2008 21:56 - link - tags: bash - path: / - 0 comments