Bug 100831 - Useful bash prompt screws up wrapping in xterm command line
Useful bash prompt screws up wrapping in xterm command line
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
7.3
i586 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-25 16:28 EDT by Guilherme Lima
Modified: 2007-04-18 12:56 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-04 04:18:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Guilherme Lima 2003-07-25 16:28:44 EDT
From Bugzilla Helper:

Description of problem:

I have seen this problem in RedHat linux 6.2, 7.1, 7.3 and 9.0.

The problem shows up when I change bash prompt to use colors.
This prompt is useful as it makes it easier to find the lines
where commands are typed.  I use xterm, but it also happens in
a few of other xterm-like windows.

After redefining the prompt to use colors, I get a nice, blue 
prompt on my xterm window.  Then when I type any long command 
I get:

- Early wrapping: new command line does not use last columns of 
  the 80-chars xterm window

- Overwritting: A newline char is not issued when wrapping occurs.  
  The wrapped characters start to overwrite the prompt and the 
  first characters of the command.

I can live with early wrapping, but the overwritting behaviour is
terribly annoying!

The colorful prompt is so useful to me that I have been using it
despite of the overwritting bug.

Version-Release number of selected component (if applicable):
XFree86-4.2.0-8

How reproducible:
Always

Steps to Reproduce:
1. In any xterm window running bash shell, redefine the prompt

bash-2.05a$ export PS1="\e[1;38mTextHereDoesNotMatter>\e[0m "

2. Type any long command, the problem shows up as the command 
   is typed in.


Actual Results:  
- Early wrapping: new command line does not use last columns of 
  the 80-chars xterm window

- Overwritting: A newline char is not issued when wrapping occurs.  
  The wrapped characters start to overwrite the prompt and the 
  first characters of the command.

Expected Results:  
If I don't redefine the prompt, there is no early wrapping or 
overwritting.  I would expect the same behaviour after the
prompt redefinition.


Additional info:

I have seen the same behaviour with several versions of RedHat
Linux.  Just to name a few: 6.2, 7.1, 7.3 and 9.0.

It is so easy to reproduce that I don't think other details, like
binary version number or my computer configuration, are relevant
here.
Comment 1 Mike A. Harris 2003-08-01 05:20:30 EDT
This sounds more like a configuration or usage problem, but it might
possibly be a bash bug or somesuch, so I'm reassigning to bash for comment.
Comment 2 Tim Waugh 2003-08-01 05:43:59 EDT
Reported upstream.

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