Summary: | coloured prompt confuses Ctrl+R in app-shells/bash-3.2_p5 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Benno Schulenberg <bensberg> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | pva |
Priority: | High | ||
Version: | 2006.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | bash-3.2-display-prompt-invis-delete.patch |
Description
Benno Schulenberg
2006-11-26 04:52:40 UTC
bash-3.2_p9 should work Nope, not fixed. It works fine after doing 'export LC_ALL=C', but not when LC_ALL=en_GB.utf8, for example (both in Konsole and on a VT). Defining PS1 as follows 'fixes' the problem: PS1='\[\033[001;031m\]\h \[\033[001;034m\]\W \$\[\033[000m\] ' That is: make each number consist of three digits. [[ Observations made before finding the workaround: Using \e instead of \033 makes no difference. Occurrence of the problem (Home going too far left) also depends on the length of the name of the current directory: when this name is longer than three characters, the problem does not occur. So when in root's home dir (~), in /etc or in /usr, hitting Home after a Ctrl+R sequence goes too far left, but when in for example /sbin or /usr/share, it goes to the correct place. When using \w instead of \W, the name of the current dir has to be somewhat longer for the problem to stop occurring: it goes wrong in /etc, /sbin and /buntu, but not any more in /camera and /cdwriter. :| (All this time I'm recalling the command 'emerge -Du world -pv' by typing: <Ctrl+R> <D> <u> <Home>.) ]] Created attachment 116120 [details, diff]
bash-3.2-display-prompt-invis-delete.patch
Try attached patch, Chet Ramey suggested to use. It should fix the problem...
Ehm, yes, that is the patch I made myself, Peter. :) It does solve the problem. Fixed with p17. @Peter: But the problem with multibyte characters in directory names isn't fixed yet. ordesa ~ # mkdir ĉaĉaĉaĉaĉa ordesa ~ # cd ĉaĉaĉaĉaĉa ordesa ĉaĉaĉaĉaĉa # ordesa ĉaĉaĉaĉaĉa # ls somefile ls: cannot access somefile: No such file or directory ordesa ĉaĉaĉaĉaĉa # ordesa ĉaĉaĉaĉaĉa # (reverse-i-search)`': aĉaĉaĉaĉa # saaile(reverse-i-search)`': s': lomes somefile (After twice <Enter>, I've typed there <^R><s><o><m><e>.) Benno, thank you fro reporting back and closing this bug report. But I did not manage to reproduce any bugs with steps you suggested: peter@camobap ~ $ bash --version GNU bash, version 3.2.17(1)-release (i686-pc-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. peter@camobap ~ $ bash peter@camobap ~ $ mkdir ĉaĉaĉaĉaĉa peter@camobap ~ $ cd ĉaĉaĉaĉaĉa peter@camobap ~/ĉaĉaĉaĉaĉa $ peter@camobap ~/ĉaĉaĉaĉaĉa $ ls somefile ls: невозможно получить доступ к somefile: Нет такого файла или каталога (reverse-i-search)`some': ls somefile So, please, if you have problems please create new bug report with detailed steps what you did and what went wrong. Assign bug on base-system AT gentoo.org (' AT ' -> @) BTW. You do not need to CC me. I receive all mail from base-system@g.o. *** Bug 177095 has been marked as a duplicate of this bug. *** |