History (readline?) problem with color prompt

Bug #110096 reported by Mislav
4
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: gnome-terminal

I think I've hit a readline problem (if Terminal uses it) that makes long lines and color prompts very hard to use at the same time. This never happened before Feisty.

version: gnome-terminal 2.18.0-0ubuntu1

To reproduce:

1. put up a simple color prompt, like:
    PS1='work:\e[0;31m\w\e[m # '
2. type or paste a long line, like:
    echo '123456789123456789123456789123456789'
3. don't execute it, but instead press Home to position the cursor on the beginning of the line
4. notice the cursor is *not* at the beginning!
5. press End to position the cursor at the end of the line
6. the cursor is now too far on the right!
7. try to delete all the characters (Backspace) - you won't be able to!
8. put up a non-colored prompt, like:
    PS1='\w # '
9. try to repeat the steps above - it works fine now.

This bug does not only break Home and End in the terminal; it also manifests itself when revoking long lines from history (UP key).

ProblemType: Bug
Architecture: i386
Date: Wed Apr 25 22:56:01 2007
DistroRelease: Ubuntu 7.04
ExecutablePath: /usr/bin/gnome-terminal
Package: gnome-terminal 2.18.0-0ubuntu1
PackageArchitecture: i386
ProcCmdline: gnome-terminal
ProcCwd: /home/mislav
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/bin
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-terminal
Uname: Linux Goliath 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux

Revision history for this message
Mislav (mislav-marohnic+ubuntu) wrote :
Revision history for this message
C de-Avillez (hggdh2) wrote :

Confirmed for bash, rejecting for gnome-terminal.

hggdh@xango:~$ PS1='work:\e[0;31m\w\e[m # '
work:~ # bash --version
GNU bash, version 3.2.13(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
work:~ # dpkg -l bash\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-======================-======================-============================================================
ii bash 3.2-0ubuntu7 The GNU Bourne Again SHell
un bash-builtins <none> (no description available)
un bash-completion <none> (no description available)
ii bash-doc 3.2-0ubuntu7 Documentation and examples for the The GNU Bourne Again SHel
un bash-minimal <none> (no description available)
un bash-static <none> (no description available)
un bashdb <none> (no description available)
work:~ #

Changed in gnome-terminal:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Revision history for this message
C de-Avillez (hggdh2) wrote :

I am setting this as a duplicate of bug 102179, and further comments will be posted there.

Changed in bash:
status: Confirmed → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.