Under bash-3.2_p2-r1 (other versions as well?) a \d, \t, or \D{...} in PS1 makes the prompt display first char at col 20 (about) and char 2 at col 1 if LC_TIME is "sv_SE.utf8". It works with LC_TIME="sv_SE" and LC_TIME="en_US.utf8" Ex (input 123456): $23456 1 ------ LANG="en_US.utf-8" LC_ADDRESS="sv_SE.utf-8" LC_COLLATE="sv_SE.utf-8" LC_CTYPE="sv_SE.utf-8" LC_IDENTIFICATION="sv_SE.utf-8" LC_MEASUREMENT="sv_SE.utf-8" LC_MESSAGES="en_US.utf-8" LC_MONETARY="sv_SE.utf-8" LC_NAME="sv_SE.utf-8" LC_NUMERIC="sv_SE.utf8" LC_PAPER="sv_SE.utf-8" LC_TELEPHONE="sv_SE.utf-8" LC_TIME="sv_SE.utf-8"
can you actually check bash-3.1 rather than guessing
Sorry if I misled you. Bash-3.1 works as expected, what I meant was I'm not sure about other 3.2 versions.
bash-3.2_p9 should work
Sorry to say but this is not the case :( It breaks when a non ASCII char is used in the day name (Monday, Saturday and Sunday - M
Sorry to say but this is not the case :( It breaks when a non ASCII char is used in the day name (Monday, Saturday and Sunday - Måndag, Lördag and Söndag)
Got a similar problem. In fact, LC is fr_BE.UTF-8 and when accessing a directory with accents in his name, the first char is misplaced. The problem comes when there is a new color definition after the \$ sequence in the PS1 definition. If the last char sequence in PS1 is \$, it works great. Bash version is 3.2_p9-r1
*added to cc*
patch in bug #155369 fixes this problem too. *** This bug has been marked as a duplicate of bug 155369 ***