Bug: garbled history search when using "\e[K" is PS1
From:
Constantine Bytensky
Subject:
Bug: garbled history search when using "\e[K" is PS1
Date:
Thu, 30 Jun 2022 15:25:45 +0300
Hello,
There is a bug when I use “Erase in Lin” "\e[K" char in my PS1 prompt.
How to reproduce:
1. Make PS1="\[\e[K\]"
2. Press ^R to start history-search
3. Type a few chars to find history string (assuming history not empty)
4. Press Enter of End to apply history string
Result:
Incomplete history string showed in prompt.
Example:
(reverse-i-search)`um': chmod g+w umount
After pressing End I got:
chmod g+w um
Regards,
Constantine