commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
If the return code from the last command was greater than zero, colour part of your prompt red. The commands give a prompt like this:
After an error, the "[user" part is automatically coloured red.
Tested using bash on xterm and terminal. Place in your .bashrc or .bash_profile.
There are 2 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.