Bug 74383 - start of line is discarded when writing a prompt
Summary: start of line is discarded when writing a prompt
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash
Version: 8.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
: 80319 86058 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2002-09-22 22:08 UTC by Miloslav Trmac
Modified: 2007-04-18 16:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2002-11-04 11:41:52 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2003:140 normal SHIPPED_LIVE Updated bash packages fix several bugs 2003-06-23 04:00:00 UTC

Description Miloslav Trmac 2002-09-22 22:08:03 UTC
Version-Release number of selected component (if applicable):

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]$

Comment 1 Miloslav Trmac 2002-10-06 00:01:36 UTC
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

Comment 2 Tim Waugh 2002-10-07 14:31:16 UTC
Yes, I've seen it too and it's annoying.

Comment 3 Need Real Name 2002-11-04 11:41:45 UTC
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
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

Comment 4 Tim Waugh 2002-12-03 10:23:40 UTC
Fixed package is bash-2.05b-12, which will shortly appear in rawhide.

Comment 5 Tim Waugh 2002-12-24 12:52:24 UTC
*** Bug 80319 has been marked as a duplicate of this bug. ***

Comment 6 Tim Waugh 2003-03-13 10:39:11 UTC
*** Bug 86058 has been marked as a duplicate of this bug. ***

Comment 7 Tim Waugh 2003-06-23 14:52:18 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.