I made the mistake of putting CDPATH into my
.profile file just to see if it would slightly boost my productivity but found that sometimes it would
cd to directories that I didn't want it to (I would need to precede them with
./ to make sure it went to the current directory rather than one defined in the environment variable that shared the same name).
I removed it from the
.profile file but it still gets exported every time I launch the terminal and for the life of me I can't find what (bash) script does it.
I would search
/etc and my home directory for any file the name of which resembles
xargs grep those files to look if there were something along the lines of
export CDPATH but to no avail.
Is this stored in a configuration file that
cd uses? Has anyone come across a similar problem?
Needless to say I did put
export CDPATH='' in my
.profile, but I need to source it first for the statement to take effect.
My bash version is 4.2.24, my OS is Linux Mint 13 Cinnamon.