I know this is weird but out of the blue, today I copied a long command into the terminal and instead of word wrapping as its supposed to, it started overwriting the same line. The command executed just fine, but it became unreadable. Typically when something like this happens, you can just press Enter a few times and it fixes, but not in this case. I restarted terminal and even rebooted and its the same story.
I might think it has something to do with the fact that I edited my /etc/bash.bashrc file to customize the prompt with color, etc. but I did that several days ago and this didn't happen after I edited it. I saved a backup just in case so if anyone thinks it might be that, I've included the output of the diff of the two files:
$ diff /etc/bash.bashrc /etc/bash.bashrc.bak
19c19
< PS1='\e[1;32m\u: \e[m\w\n\e[1;33m\$\e[m '
---
> PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
Any ideas are helpful, this is a really strange problem.