Need to have extra pair of backslash sqbraces i.e. \[ .. \] surrounding the colour escape commands in PS1 otherwise the linebreaking of long commands gets screwed up.