Bash Ctrl-A Returns to Start of Line but Doesn't Display Properly
Solution 1:
Add \[
and \]
around the colour codes to enable bash to calculate the line length correctly. Something like this:
PS1=\n \[\e[1;95m\] \u@\h \[\e[0;32m\]\w \[\e[1;30m\] $(__git_ps1 " (%s)" ) \n \[\e[1;95m\] \@ \n $ \[\e[0;30m\]
(This answer is taken from @Mark's comment on the question.)