Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I modified my .bash_profile on my Mac (now running Tiger) to get a different command prompt. Before I did that, I used to be able to use the up arrow key to cycle through previously issued commands. Now, though, I get a weird mix of characters -- it kind of overwrites the prompt with a partial mix of the previous command, making it unreadable. It's very odd and I've clearly done something wrong. The command is actually all there -- if I hit enter, it works, even though I can't clear read it.

export PS1="\[\e[0;36m \w $\[\e[0m\] "
share|improve this question

migrated from stackoverflow.com Aug 3 '11 at 1:41

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

you forgot to close the escape sequence for the first color change:

export PS1="\[\e[0;36m\] \w $\[\e[0m\] "
                      ^^
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .