In a single-byte locale, if the prompt is wider than the screen width
and contains invisible characters on the last line, and the input line
is also wider than the screen width, redisplay gets messed up:
printf -v s '%*s' "$COLUMNS"
PS1=$s'%\[\e[0m\]' LC_ALL=C bash --norc -in <<< $s$'X\caYZ'
% [0mYZ mYZ
X
This is reproducible in the devel branch and going back to version 3.2
(at least the one shipped in macOS).
[Prev in Thread]
Current Thread
[Next in Thread]
Another redisplay issue in single-byte locales,
Grisha Levit<=