On 11/25/15 3:33 AM, Ryo Furue wrote: > Bash Version: 4.3 > Patch Level: 42 > Release Status: release > > Description: > When PS1 includes \w and when \w contains long path including UTF > characters, the cursor position or the command line is messed up. > > Repeat-By: > 1. Source the attached script: > $ . bash-prompt-bug.sh > > 2.1. You'll find the prompt is messed up: shorter than the > real path name, garbage character at the top. > 2.2. If you use the tput commands, which are commented out > in bash-prompt-bug.sh, the prompt is fine, but the cursor > position is messed up. > > 3. After 2.2, try to complete filenames by pressing TAB, > and sometimes you'll find the cursor position is > even more badly messed up.
Thanks for the report. I could not reproduce 2.1 with bash-4.4-beta (prompt with multibyte characters whose visible length exceeds the screen width and consequently wraps), but 2.2, which combines that with invisible characters in the prompt (which need to be included in calculations to determine cursor position), displays incorrectly. This will be fixed in the next release of bash. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/