Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 177095

Summary: app-shells/bash-3.2_p17: multibyte characters in prompt still confuse Ctrl+R
Product: Gentoo Linux Reporter: Benno Schulenberg <bensberg>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: minor    
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: examples of ^R showing a mess
example of ^R messing up with a colourless prompt

Description Benno Schulenberg 2007-05-04 21:44:00 UTC
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 Benno Schulenberg 2007-05-04 21:47:08 UTC
Created attachment 118180 [details]
examples of ^R showing a mess
Comment 2 SpanKY gentoo-dev 2007-05-05 01:34:33 UTC

*** This bug has been marked as a duplicate of bug 156292 ***
Comment 3 Benno Schulenberg 2007-05-05 12:23:27 UTC
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 Benno Schulenberg 2007-05-05 12:25:40 UTC
Created attachment 118229 [details]
example of ^R messing up with a colourless prompt
Comment 5 Peter Volkov (RETIRED) gentoo-dev 2007-05-05 14:51:20 UTC
Yes. This is completely different issue. I've just sent my observations upstream and hope Chet will fix this soon.
Comment 6 SpanKY gentoo-dev 2008-01-02 15:09:21 UTC
you can retry with 3.2_p33 as it has some invisible byte fixes
Comment 7 SpanKY gentoo-dev 2012-03-12 14:53:17 UTC
seems to work for me with bash-4.2