fish home | Main documentation page | Design document | External commands | Builtin commands | FAQ | License

Frequently asked questions


Why does cd, pwd and other fish commands always resolve symlinked directories to their canonical path?

For example if I have the directory ~/images which is a symlink to ~/Documents,/Images if I write 'cd doc', my prompt will say ~/D/Images, not ~/images.

Because it is impossible to consistently keep symlinked directories unresolved. It is indeed possible to do this partially, and many other shells do so. But it was felt there are enough serious corner cases that this is a bad idea. Most such issues have to do with how '..' is handled, and are varitations of the following example:

Writing cd images; ls .. given the above directory structure would list the contents of ~/Documents, not of ~, even though using cd .. changes the current direcotry to ~, and the prompt, the pwd builtin and many other directory information sources suggest that the the current directory is ~/images and it's parent is ~. This issue is not possible to fix without either making every single command into a builtin, breaking Unix semantics or implementing kludges in every single command.

This issue can also be seen when doing IO redirection.

Another related issue is that many programs that operate on recursive directory trees, like the find command, silently ignore symlinked directories. For example, find $PWD -name '*.txt' silently fails in shells that don't resolve symlinked paths.


Why does the cd command autocompletion list the subdirectories of my home directory as completions?

Because they are completions. In fish, if you specify a relative directory to the cd command, i.e. any path that does not start with '.' or '/', the environment variable CD_PATH will be examined, and any directories in this path is used as a base direcotry. To disable this feature, use the command set CD_PATH ..


I accidentally entered a directory path and fish changed directory. What happened?

If fish is unable to locate a command with a given name, fish will test if a directory of that name exists. If it does, it is implicitly assumed that you want to change working directory. For example, the fastest way to switch to your home directory is to simply type ~.


The open command doesn't work.

The open command uses the mimetype database and the .desktop files used by Gnome and KDE to identify filetypes and default actions. If at least one of these two desktops are installed, but the open command is not working, this probably means that the relevant files are installed in a nonstandard location. Please contact the fish mailing list, and hopefully this can be resolved.
Generated on Sun May 21 22:38:54 2006 for fish by doxygen 1.3.4