This bugs me occasionally. jorton@trash:~$ rpm -q bash bash-3.0-25.i386 jorton@trash:~$ echo -n foo foojorton@trash:~$ OK so far; now type "bar" then hit Ctrl-a then Ctrl-e jorton@trash:~$ barbar the line is redrawn from column 0 but is not cleared first. bug or feature?
Feature. Bash either has to assume that it's starting on the first column (leading to the behaviour you see), or make sure that it's starting on the first column by emitting '\r' before the prompt. In the latter case (which was the behaviour for a short while) you would not see the output of the echo command at all, since it would be overwritten.