Here are some files/directories are run in the following order, that worth to note:
~/.config/fish/conf.d/
: fish local config dir/etc/fish/conf.d/
: fish system config dir
If some softwares need specific configuration snippets, they can be put inside:
-
$XDG_DATA_HOME/fish
controlled by$XDG_DATA_HOME
(default value is$HOME/.local/share
) -
$XDG_DATA_DIRS/fish/vendor_conf.d
controlled by$XDG_DATA_DIRS
(default value is/usr/local/share/:/usr/share/
)
Note: $XDG_DATA_HOME
and $XDG_DATA_DIRS
can be changed depending on different OS distribution.
Note 2: If there are multiple files with the same name in configuration snippets, only the 1st will be executed.
/etc/fish/config.fish
~/.config/fish/config.fish
(usually we work with this file, since it's the last file that's executed)