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:
I put that line in my .bash_profile (OS X) and .bashrc (Linux).
Here is a summary of what the \char means: n=new line, u=user name, h=host, !=history number, w=current work directory
The \[\e[32m\] sequence set the text to bright green and \[\e[0m\] returns to normal color.
For more information on what you can set in your bash prompt, google 'bash prompt'
There are 9 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.