Your message dated Wed, 7 Aug 2024 23:23:04 +0200
with message-id <[email protected]>
and subject line Re: Bug#680677: bash fails if PS1 has colour code
has caused the Debian Bug report #680677,
regarding bash fails if PS1 has colour code
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
680677: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680677
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bash
Version: 4.1-3
Severity: normal
TERM=linux (Default)
LANG and LC_CTYPE mentioned below (en_US.UTF-8) , however this seems irrelevant
as I get the same symptom even with LANG=C
I use a custom PS1 prompt in .bashrc as,
export PS1='\e[1;33;40m\h\e[1;31;40m root\e[1;37;40m@\w\e[1;37;40m\e[m\n## '
this gives me something as ..
"
debian-miniitx root@~
##
"
If I take out the \n from my PS1, ctrl-r in bash is problematic.
Scenario i use to test,
vi .bashrc, edit PS1, (ctl-z), then I type bash, then ctl-c to see if there's
an issue.
When trying ctl-c, i would type a few letters to match a history command, then
tap the left/right arrow.
What I get is display corruption on the prompt line after tapping left/right
arrow ..
PS1 with \n -> no corruption
PS1 without \n -> corruption
(not using an ssh session)
-- System Information:
Debian Release: 6.0.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages bash depends on:
ii base-files 6.0squeeze5 Debian base system miscellaneous f
ii dash 0.5.5.1-7.4 POSIX-compliant shell
ii debianutils 3.4 Miscellaneous utilities specific t
ii libc6 2.11.3-3 Embedded GNU C Library: Shared lib
ii libncurses5 5.7+20100313-5 shared libraries for terminal hand
Versions of packages bash recommends:
ii bash-completion 1:1.2-3 programmable completion for the ba
Versions of packages bash suggests:
ii bash-doc 4.1-3 Documentation and examples for the
-- no debconf information
--- End Message ---
--- Begin Message ---
On Sat, 07 Jul 2012 18:06:11 -0400 jb <[email protected]> wrote:
I use a custom PS1 prompt in .bashrc as,
export PS1='\e[1;33;40m\h\e[1;31;40m root\e[1;37;40m@\w\e[1;37;40m\e[m\n## '
this gives me something as ..
"
debian-miniitx root@~
##
"
If I take out the \n from my PS1, ctrl-r in bash is problematic.
The issue here is that the escape sequences are not surrounded by \[ and
\]. From
<https://lists.gnu.org/archive/html/bug-bash/2023-09/msg00093.html>:
The man page states
PROMPTING
[...]
\[ begin a sequence of non-printing characters, which could
be used to embed a terminal control sequence into the
prompt
\] end a sequence of non-printing characters
See also: https://mywiki.wooledge.org/BashFAQ/053
Regards,
--
Gioele Barabucci
--- End Message ---