open a file using CDPATH and symlink

view story

http://unix.stackexchange.com – To quickly move around, I added a path to CDPATH that contains symlinks to different locations. I did this by adding the following line to .bashrc: export CDPATH=~/symlinks When working with directories, everything's fine and I can access the symlinked folders from everywhere. For example if I do: $ ln -s ~/path/to/folder ~/symlinks/folder I can then just write: $ cd folder to get inside the symlinked folder, regardless of my current directory. However, when I create a symlink to a file and then try to open it with an editor, I get an empty file, unless I'm in the symlink directory. (HowTos)