Bug 139575 - prompt sequences \[ and \] broken
prompt sequences \[ and \] broken
Product: Fedora
Classification: Fedora
Component: bash (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2004-11-16 14:31 EST by David Baron
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-18 12:15:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Baron 2004-11-16 14:31:29 EST
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
  \]     end a sequence of non-printing characters

Version-Release number of selected component (if applicable):
(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 04:15:37 EST
I expect this is due to the 'bash-read-e-segfault.patch' patch not
being quite right.
Comment 2 Tim Waugh 2004-11-18 12:15:44 EST
Fixed in bash-3.0-23.
Comment 3 David Baron 2004-11-20 14:31:21 EST
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.