Wednesday, March 12, 2008

Ideal command prompt


In setting up my new laptop, I've been experimenting with different command prompt settings in bash. Here is what I've settled on for now (click for a more clear image). It's simple, yet gives me all of the information I need in a format that is easy for the eye to parse. That's because the text color of the full path is inverted from your other colors.

If you are interested in using/tweaking it:
export PS1="\u:\[\e[0;07m\w\e[m\]> "

What's your ideal PS1? Here's a how-to article. It's written with Linux in mind, but the information applies to pretty much any environment where bash is present (OS X, Unix, Cygwin, etc.).

EDIT: My original post did not wrap the color code in \[ and \] which caused the first line wrap to overwrite the current line. Fixed!

1 comment:

  1. PPC Promotion and marketing is very important to get the business for professional company especially for Tech Support & web design company.
    Google Adwords For Tech Support
    PPC Expert For Tech Support
    Inbound Technical Support call | Call at: +91 981-142-0083 | inbound calls for tech support tech support inbound calls A great online marketing company for tech support inbound calls, Inbound Technical Support call by osiel web

    ReplyDelete