Red Hat Bugzilla – Bug 146264
bash (readline?) issue after command returned without LF
Last modified: 2007-11-30 17:10:59 EST
This bugs me occasionally.
jorton@trash:~$ rpm -q bash
jorton@trash:~$ echo -n foo
OK so far; now type "bar" then hit Ctrl-a then Ctrl-e
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.