Bug 139575 - prompt sequences \[ and \] broken
Summary: prompt sequences \[ and \] broken
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-16 19:31 UTC by David Baron
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-11-18 17:15:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Baron 2004-11-16 19:31:29 UTC
Description of problem:  The prompt sequences \[ and \] are broken in
the latest development bash.  (I upgraded from bash-3.0-18 (latest FC3
errata) to bash-3.0-22 (development tree) to pick up the fix for bug
139306, and saw this regression.)

These sequences are documented in man bash as:

  \[     begin  a sequence of non-printing characters, which could
         be used to embed a terminal  control  sequence  into  the
         prompt
  \]     end a sequence of non-printing characters


Version-Release number of selected component (if applicable):
bash-3.0-22
(bug did not exist in bash-3.0-18)

How reproducible: always

Steps to Reproduce:
1. run bash inside something xterm-ish
2. export PS1="\u@\[\033[32m\]\h\[\033[0m\] `uname -s` (\$?) \w \\\$ "
(yep, that's really my prompt string!)
3. type a bunch of characters at the prompt, until the line wraps
  
Actual results:
the characters start wrapping 9 characters before the right edge of
the terminal window

Expected results:
characters wrap at the edge of the terminal window, just as they do when
PS1="\u@\h `uname -s` (\$?) \w \\\$ "

Comment 1 Tim Waugh 2004-11-17 09:15:37 UTC
I expect this is due to the 'bash-read-e-segfault.patch' patch not
being quite right.

Comment 2 Tim Waugh 2004-11-18 17:15:44 UTC
Fixed in bash-3.0-23.

Comment 3 David Baron 2004-11-20 19:31:21 UTC
Verified as fixed in bash-3.0-24.


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