3 ms·
fish shell discovers its own filesystem path, and then looks for resources (completions, functions, etc) relative to that path. You can move a fish directory hi
by ridiculous_fish 6y ago
fish shell discovers its own filesystem path, and then looks for resources (completions, functions, etc) relative to that path. You can move a fish directory hierarchy to someplace else and it will still work.
One advantage is testing. To test fish, it first must be installed into a directory tree, but relative paths are preferred over build-time paths, so there is no special "build for test" mode. Also this makes it easier for fish to invoke itself as part of a test.
A second advantage is embedding. GNU encourages supporting relocation [1], and fish also provides a Mac app which can be run from anywhere, no installation.
Anyways there's a lot of benefits if a shell can find itself.
1: https://www.gnu.org/software/gnulib/manual/html_node/Supporting-Relocation.html https://www.gnu.org/software/gnulib/manual/html_node/Support...