I stumbled upon this bug when using a color PS4 prompt to trace bash
scripts.  Usually it would display fine, but I noticed some strange
behavior once the shell level increased enough.

Bash repeats the first character of the PS4 prompt to indicate the shell
level for scripts that call other scripts (or subshells).  Once the
shell level increases enough, the characters at the end of the prompt
are truncated.

This causes display problems, especially if the "color off" ANSI code is
chopped off the end.

Many thanks for finding this bug!
It was driving me nuts until I used the 'script' command to record my 
terminal's raw output and found that the prompt was being truncated.

With this patch, I still see that rl_message still seems to use a size
of 128 and truncates if my system does not have vsnprintf.  I compiled
bash-static and tested a long PS4 with color codes, and it still seems
to truncate for me.

How can I check that my system has vsnprintf?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/721982

Title:
  Corrupt display for history search in vi-mode, 256-color prompt

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/721982/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to