I recently decided to start playing around with colorized PS1. It colorized all right. The problem is, it started doing extremely odd things. When I set my PS1 to:
PS1="\e[34m[\u@\h \W]\$\e[m "
(Turns it purple)
It starts to wrap the line early, by about ten columns, and instead of wrapping it onto the next line, it's just going back to the beginning of the same line as it's on as though I had typed "echo -e \r", but I didn't. The same thing happens when PS1 is
PS1="\e[0;34m[\u@\h \W]\$\e[m "
or
PS1="$(tput setaf 5)[\u@\h \W]\$(tput setaf 0) "
(Though note, the tput one just turns it black in the end so the virtual terminals don't work that way.)
I tried all three, and they all make the prompt purple, but they all make the thing rotate back to the beginning of the current line, so that if I keep typing it overwrites the prompt. Then, if I hit backspace a bunch of times, it starts erasing the PREVIOUS line.
Any ideas what's happening?
--Scott