wrap color sequences in \[ \] to stop bash from wrapping incorrectly
copy escape brackets to other prompts.

http://stackoverflow.com/questions/706750/why-is-this-bash-prompt-acting-strangely-disappearing-and-how-do-i-fix-it-os-x