Bash problem Mac OS Terminal
I tried around and finally managed to find the error: you need to use even more escape sequences in your PS1 - this should work:

export PS1="\# \[\e[32;1m\]\w &gt; \[\e[0m\]"


note the additional \[ and \] that wrap the colour escape sequences.