Fix for bash line-wrapping & backspace display bugs on Mac OS X?
The behavior is consistent to having console codes in your prompt (to change the color, etc.) and not properly marking then so that bash knows that they are invisible.
Before anything else, do this:
PS1='\w\$ '
And then try again. If the problem is solved, then my suspicions are correct.
Each console code sequence must be delimited with \[
and \]
in the PS1 variable. They tell bash that whatever is in there doesn't move the cursor position. Read the bash manual for more information.
To help generate a sanitized prompt try http://www.kirsle.net/wizards/ps1.html it's pretty awesome. Just be careful with brackets in your prompt, it tries to escape them or something.