Monday, September 23, 2013

BASH Color Codes in Mac OS X 10.8

While trying to port my command line environment from Linux to Mac OS X I ran across a problem with the color codes in BASH not being recognized. The color codes I was using were in the form of


The problem was that the BASH shell under Mac OS X was not recognizing the escape sequence \e, the escape sequence you need to use under Mac OS X 10.8 is \033, so your color code would look like:


Which is actually the old way of writing the color codes. Hope this helps.

No comments:

Post a Comment