My bash shell will no longer change directory with cd. I noticed it earlier when working and found that any new shells I opened (terminal or xterm etc) would be stuck in the home directory and could not get out (already open terminals continued to work fine).
[~]$ pwd /home/sys/dave [~]$ cd / [~]$ cd Documents/ [~]$ pwd /home/sys/dave [~]$ type cd cd is a shell builtin [~]$ alias alias l.='ls -d .* --color=auto' alias ll='ls -l --color=auto' alias ls='ls --color=auto' alias vi='vim' alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
I thought it must be some weirdness I didn't have time to deal with such as a handler out of memory (having checked that cd wasn't aliased and using the builtin version).
So I (yes, I know) rebooted the machine.
Fresh boot, exactly the same problem.
CSH on the other hand works fine, so immediately after the snippet above:
[~]$ csh [~]$ cd / [/]$ pwd / [/]$ cd ~/Documents/ [~/Documents]$ pwd /home/sys/dave/Documents [~/Documents]$
I haven't installed anything new or performed any updates in the last few days and it was working fine until late this evening.
Ideas/assistance/HELP much appreciated!
** UPDATE **
So digging around I found this line in .bashrc
If I unset PROMPT_COMMAND then everything works as normal.
But... WTF. I didn't put this line in the .bashrc and everything was working perfectly until tonight. Should I just comment it out, manually unset it, or just burn the computer as a witch?