Bug 100831 - Useful bash prompt screws up wrapping in xterm command line
Summary: Useful bash prompt screws up wrapping in xterm command line
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
(Show other bugs)
Version: 7.3
Hardware: i586 Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-25 20:28 UTC by Guilherme Lima
Modified: 2007-04-18 16:56 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Guilherme Lima 2003-07-25 20:28:44 UTC
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 09:20:30 UTC
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 09:43:59 UTC
Reported upstream.



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