bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOD escape sequence breaks reverse-i-search


From: Mattias Ahlbäck
Subject: EOD escape sequence breaks reverse-i-search
Date: Sun, 31 Jul 2011 04:12:43 +0200

Hi all!
During prompt (PS1) customization I found that using the "end-of-document"
escape sequence (in a special manner) breaks editing of revers-i-search
results containing a space character. The whole result string turns
transparent, while results not containing a space shows as expected.

OS:
$ uname -a
Linux archie 2.6.39-ARCH #1 SMP PREEMPT Sat Jul 9 15:31:04 CEST 2011 i686
Intel(R) Celeron(R) CPU 2.60GHz GenuineIntel GNU/Linux

Bash version:
$ bash -version
GNU bash, version 4.2.10(2)-release (i686-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
Licens GPLv3+: GNU GPL version 3 eller senare <
http://gnu.org/licenses/gpl.html>
[...]

Reproduce:
1. Set PS1 to following:
PS1='\n \[\033[40m\]\[\033[37m\]\[\033[1m\]\u\[\033[0m\]\[\033[40m\]
\[\033[37m\]\h \j \[\033[1m\]\w\[\033[0J\]\[\033[0m\]\n \[\033[0J\]\$
\[\033[0m\]'

...alternatively:
cblackb=$'\033[40m'
cwhite=$'\033[37m'
cbold=$'\033[1m'
cnull=$'\033[0m'
ceod=$'\033[0J'

PS1='\n ${cblackb}${cwhite}${cbold}\u${cnull}${cblackb} ${cwhite}\h \j
${cbold}\w${ceod}${cnull}\n ${ceod}\$ ${cnull}'

2. Issue a reverse-i-search, select a result containing a space character
(most of them right ;) and try to edit it.

Expected result:
The selected result should show as standard formatted text, whether
containing a space character or not.

What really happens:
Selected results containing a space are transparent.

Previous discussion:
https://bbs.archlinux.org/viewtopic.php?id=123402


Thanks!
(Do I need to subscribe to the list to follow this potential issue?)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]