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=~/symlinksWhen 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/folderI can then just write:$ cd folderto 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.For example if I do:$ ln -s ~/path/to/file/filename ~/symlinks/filenameand then write:$ kwrite filenameI get an empty file, if I'm not in the symlink folder.I want to access the file from anywhere though, how can I achieve this?
open a file using CDPATH and symlink
shell;files;directory;symlink;path