Bug 177095 - app-shells/bash-3.2_p17: multibyte characters in prompt still confuse Ctrl+R
Bug#: 177095 Product:  Gentoo Linux Version: 2006.1 Platform: All
OS/Version: Linux Status: REOPENED Severity: minor Priority: P2
Resolution:  Assigned To: base-system@gentoo.org Reported By: bensberg@justemail.net
Component: Core system
URL: 
Summary: app-shells/bash-3.2_p17: multibyte characters in prompt still confuse Ctrl+R
Keywords:  
Status Whiteboard: 
Opened: 2007-05-04 21:44 0000
Description:   Opened: 2007-05-04 21:44 0000
For now I can only reproduce this when the hostname is 3, 4, 5 or 6 characters
long, and the directory name 9, 10 or 11 characters long.

Try setting PS1='\[\e[1;32m\]xxyyzz \[\e[1;34m\]\w \$\[\e[0m\] ', then 
mkdir ĉaĉaĉaĉaĉ, cd ĉaĉaĉaĉaĉ, ls somefile, ^R so

See attached typescript for an example.  I've unset PROMPT_COMMAND to get rid
of the extra output.  This is on a Konsole, with Encoding set to Unicode
(utf8).

------- Comment #1 From Benno Schulenberg 2007-05-04 21:47:08 0000 -------
Created an attachment (id=118180) [details]
examples of ^R showing a mess

------- Comment #2 From SpanKY 2007-05-05 01:34:33 0000 -------

*** This bug has been marked as a duplicate of bug 156292 ***

------- Comment #3 From Benno Schulenberg 2007-05-05 12:23:27 0000 -------
Sorry, vapier, this is not a duplicate.  The other bug is about colours in the
PS1 prompt (with any type of characters), this is about multibyte characters in
the directory name (while any colour is irrelevant).  Here is a simpler recipe:

PS1='xxyy \W \$ '
LC_ALL=en_GB.utf8
mkdir ĉaĉaĉaĉaĉa
cd ĉaĉaĉaĉaĉa/
ls somefile
^R so

------- Comment #4 From Benno Schulenberg 2007-05-05 12:25:40 0000 -------
Created an attachment (id=118229) [details]
example of ^R messing up with a colourless prompt

------- Comment #5 From Peter Volkov 2007-05-05 14:51:20 0000 -------
Yes. This is completely different issue. I've just sent my observations
upstream and hope Chet will fix this soon.

------- Comment #6 From SpanKY 2008-01-02 15:09:21 0000 -------
you can retry with 3.2_p33 as it has some invisible byte fixes