When I am typing on the Terminal.app and reach the end of the line, the next line starts on top of the first line, overwriting everything. Then if I use the delete key everything messes up and disappears.
I did a ssh in the same terminal to a different host and it worked fine, so can it be a problem with my shell configuration?
Watch the movie to see what happens: [deprecated link to now-spam removed]
Thanks,
-Sergio
You need to mark the escape codes in your PS1 variable that are setting up your coloured prompt. The shell needs to know they're not printable and then it will calculate your line wrap properly.
Here's a link to an explanation and some examples:
http://www.artemfrolov.com/articles/coloured-bash-prompt
The quick tip:
\[ begins a sequence of non-printing characters
\] ends a sequence of non-printing characters