# PS1 messes up the shell line wrapping



## BeastieBoy (Jul 5, 2010)

Hi,

Here is my PS1 for bash:


```
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.


----------



## fronclynne (Jul 7, 2010)

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 )


----------



## BeastieBoy (Jul 7, 2010)

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.


----------



## fronclynne (Jul 7, 2010)

Yeah, only sh(1) & tcsh(1) in base.  There is at least [thread=821]one thread on this[/thread] very subject.


----------

