Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.