Mac OS X and colorized Terminal.app

Posted on November 28, 2008
Filed Under bash, mac os x | Leave a Comment

I used to like colorized bash prompt on my Linux boxes, whereas default Terminal.app prompt will give you a bit boring colors.

You can change that with below snippet of code in your .bashrc

PS1=’\[\033[01;32m\]\u\[\033[01;34m\] @ \[\033[01;31m\]\h \[\033[00;34m\][ \[\033[01;34m\]\W \[\033[00;34m\]]\[\033[01;32m\] \[\033[00m\]‘

If you want to test above prompt without doing any changes to your current/default prompt, you can just copy/paste below in your prompt and press [Enter]:

export PS1=’\[\033[01;32m\]\u\[\033[01;34m\] @ \[\033[01;31m\]\h \[\033[00;34m\][ \[\033[01;34m\]\W \[\033[00;34m\]]\[\033[01;32m\] \[\033[00m\]‘

Update: Forgot to link the source that I’ve used http://twistedcode.blogspot.com/search/label/howtos

Comments

Leave a Reply