My bash command prompt is:

\e[32;1m[\e[m\h.\u \e[33;1m\W\e[m\e[32;1m]\e[0;36m::\e[m

There must be something wrong with it, because on long lines, the current line is overwritten, instead of continuing on the next line.

I'm using OSX and bash 3.2.48

link|improve this question

feedback

1 Answer

up vote 4 down vote accepted

Every non printable sequence of characters must be enclosed between \[ and \]:

'\[\e[32;1m\][\[\e[m\]\h.\u \[\e[33;1m\]\W\[\e[m\e[32;1m\]]\[\e[0;36m\]::\[\e[m\]'
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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