bash prompt \W (working dir) garbled
I'm getting weird behavior with my bash prompt. Here's some of the
things I see on my system.
$ bash # start a new shell
$ PS1='\W '
~ cd /home
hmee cd /media
meiia cd /boot
bott cd /lib32
li332 cd /selinux
selinux cd /proc
pocc cd
~ mkdir home && cd home
home cd .. && rmdir home
~ mkdir media && cd media
media cd .. && rmdir media
As you can see \W gets garbled in sub-directories of /. The three
letter directories are fine as is /selinux, but the 4 and 5 letter
ones are messed up. PS1='\w ' works fine. It does not seem to be
related to the terminal emulator - I've seen the same behavior in
urxvt and a gnome-terminal over ssh. I have no idea where to begin to
diagnose this.
Running Debian AMD64 Squeeze on a Thinkpad T61
echo $BASH_VERSINFO
4
echo $BASH_VERSION
4.1.5(1)-release
bash --version
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
...
Any suggestions pointing me in the right direction would be greatly
appreciated. Thanks in advance.
Jimmy
Reply to: