I'm trying to fix a curious problem I'm having with bash prompt (PS1) manipulation, and I'm very confused as to why \W is re-writing 'pwd' improperly in my case.
user@server-01:/repo$ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\W\$ '
user@server-01:rpoo$
user@server-01:rpoo$ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
user@server-01:/repo$
The following / directories show up weird:
/boot = bott
/home = hmee
/lib32 = li332
/lib64 = li664
/media = meiia
/proc = pocc
/repo = rpoo
/sbin = sinn
What I'd like to know is why is '\W' showing 'rpoo' instead of 'repo', and the others above... '\w' on the other hand displays the full path and correct names as expected?! I'm not doing anything very complex with my prompts, and I have a 'facter' dependency statement in my bash prompting, but even going back to the defaults I still see this funky substitution. This is a git repository directory, but that shouldn't have anything to do with it. I have this problem only on a two of three servers that hold this repository, other servers with the same bash.bashrc file work and operate fine, without this kind of \W funky substitution. Freshly deployed systems with this same prompt are OK.
I tried to search for how or what \W was being set to with no success, but \w is not behaving the same. Any help on tracing this thing down???