From 80000ef4d5856e8e0f99412f08796b831dbf194d Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 7 Nov 2023 17:43:20 +0100 Subject: [PATCH] Document $__fish_vendor_confdirs and __fish_build_paths Fixes #10078 (cherry picked from commit ddd9d183e2226a374a751307cc972150801590e8) --- doc_src/language.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc_src/language.rst b/doc_src/language.rst index 164618f7c..e69a0f0f3 100644 --- a/doc_src/language.rst +++ b/doc_src/language.rst @@ -1836,7 +1836,7 @@ Configuration files are run in the following order: - ``$__fish_config_dir/conf.d`` (by default, ``~/.config/fish/conf.d/``) - ``$__fish_sysconf_dir/conf.d`` (by default, ``/etc/fish/conf.d/``) - - Directories for others to ship configuration snippets for their software. Fish searches the directories under ``$__fish_user_data_dir`` (usually ``~/.local/share/fish``, controlled by the ``XDG_DATA_HOME`` environment variable) and in the ``XDG_DATA_DIRS`` environment variable for a ``fish/vendor_conf.d`` directory; if not defined, the default value of ``XDG_DATA_DIRS`` is ``/usr/share/fish/vendor_conf.d`` and ``/usr/local/share/fish/vendor_conf.d``, unless your distribution customized this. + - Directories for others to ship configuration snippets for their software. Fish searches the directories under ``$__fish_user_data_dir`` (usually ``~/.local/share/fish``, controlled by the ``XDG_DATA_HOME`` environment variable) and in the ``XDG_DATA_DIRS`` environment variable for a ``fish/vendor_conf.d`` directory; if not defined, the default value of ``XDG_DATA_DIRS`` is ``/usr/share/fish/vendor_conf.d`` and ``/usr/local/share/fish/vendor_conf.d``, unless your distribution customized this. These directories are also accessible in ``$__fish_vendor_confdirs``. Note that changing them in a running fish won't do anything as by that point the directories have already been read. If there are multiple files with the same name in these directories, only the first will be executed. They are executed in order of their filename, sorted (like globs) in a natural order (i.e. "01" sorts before "2"). @@ -1850,6 +1850,8 @@ These files are all executed on the startup of every shell. If you want to run a If you are developing another program, you may want to add configuration for all users of fish on a system. This is discouraged; if not carefully written, they may have side-effects or slow the startup of the shell. Additionally, users of other shells won't benefit from the fish-specific configuration. However, if they are required, you can install them to the "vendor" configuration directory. As this path may vary from system to system, ``pkg-config`` should be used to discover it: ``pkg-config --variable confdir fish``. +For system integration, fish also ships a file called ``__fish_build_paths.fish``. This can be customized during build, for instance because your system requires special paths to be used. + .. _featureflags: Future feature flags