Showing posts with label Prompt. Show all posts
Showing posts with label Prompt. Show all posts

Wednesday, January 9, 2008

Modifying Terminal's Prompt String, Revisited.

Soon after modifying my prompt string in Terminal, I wasn't too happy about the excessive length that this added to each Terminal Prompt. I also didn't like how it wasn't exactly 100% consistent with the look of Tiger's Terminal. So after a few days I decided to go back to the post that I originally saw this tip from and actually read it a bit more thoroughly this time.

After taking a glance at the table of environment variables, I quickly constructed a string, that I believe is identical to the prompt string that appears in Tiger.

export PS1="\h:\w \u\\$ "

The only thing that I am a bit confused with is the double "\\" near the end of the string and the use of double quotes. Some examples on the blog post use double quotes, whereas some use just single quotes. I'm assuming that these are interchangeable.

Another one I like, is even shorter, and I'll probably be switching in between these two depending on what I'm working on.

export PS1="\h:\w\\$ "