Skip to content

Instantly share code, notes, and snippets.

@vhbui02
Last active April 29, 2023 03:06
Show Gist options
  • Save vhbui02/c09672a7a303c56d13735e58540261a2 to your computer and use it in GitHub Desktop.
Save vhbui02/c09672a7a303c56d13735e58540261a2 to your computer and use it in GitHub Desktop.
[Configuration File in Fish] some file/directory that funcs are loaded when startup #fish

Here are some files/directories are run in the following order, that worth to note:

Configuration snippets (named *.fish)

  • ~/.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.

System-wide configuration files

/etc/fish/config.fish

User configuration

~/.config/fish/config.fish (usually we work with this file, since it's the last file that's executed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment