PS1 messes up the shell line wrapping

Hi,

Here is my PS1 for bash:

Code:
export PS1='\[\e[1;31m[ \e[0;33m\u@\h: \e[0;32m\w \e[1;31m] \e[0m$\] '

I thought all was well escaped, but when I use the up/down arrows it sometimes gets all garbaged, overprints on the same line and such.
 
I don't know much about bash per se bash, but are you quite certain it is your $PS1 and not some other setting? ( the rare times I actually use bash my $PS1 tends to be just the default one from /usr/share/skel/dot.shrc )
 
Yes it's the PS1 that's giving trouble. I solved the problem by copying the PS1 from my debian box. It's the same output but with a nastier and unreadable syntax. The escape characters are different.

What do freebsd people generally use? tcsh? I'd like to give a chance to another shell.
 
Back
Top