Version-Release number of selected component (if applicable): bash-2.05b-3 Sometime between 7.3 and (null), bash started to return to the start of a line before writing its prompt, which is confusing, unexpected and discards potentially-very-hard-to-get-again information (I have spent 10 minutes figuring out why "rpm -q --qf '%{ARCH}' kernel" gave no output, but what if I forget the last "\n" in last printf of a two-weeks-running program?). Steps to Reproduce: 1. open gnome-terminal 2. insert "echo -n foo" 3. insert "echo -n 012345678901234567890123456789" Actual Results: [mitr@localhost mitr]$ echo -n foo [mitr@localhost mitr]$ echo -n 012345678901234567890123456789 [mitr@localhost mitr]$ 3456789 Expected Results: [mitr@localhost mitr]$ echo -n foo foo[mitr@localhost mitr]$ echo -n 012345678901234567890123456789 012345678901234567890123456789[mitr@localhost mitr]$
Same in 8.0. Note that this does occurr in gnome-terminal, xterm and konsole, but *not* on a virtual terminal. Note also that in gnome-terminal and the two other, backspacing though accented characters in UTF-8 is OK, but on a virtual terminal it moves to the left too much; this might have the same cause.
Yes, I've seen it too and it's annoying.
It's not limited to builtins; the same happens for /usr/bin/printf for example. It has nothing to do with PROMPT_COMMAND (unsetting it does not correct the behaviour). It is not related to $TERM (using e.g. linux as TERM does not correct the problem). Using 'echo -n foo; sleep 2' clearly shows the cursor at the start of the line already.
Fixed package is bash-2.05b-12, which will shortly appear in rawhide.
*** Bug 80319 has been marked as a duplicate of this bug. ***
*** Bug 86058 has been marked as a duplicate of this bug. ***
An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2003-140.html