docs: A bit more on autoloading

This commit is contained in:
Fabian Homborg
2021-05-15 18:15:57 +02:00
parent e10cab8104
commit af84c35282
2 changed files with 9 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ Synopsis
Description
-----------
``funcsave`` saves a function to a file in the fish configuration directory. This function will be automatically loaded by current and future fish sessions. This can be useful if you have interactively created a new function and wish to save it for later use.
``funcsave`` saves a function to a file in the fish configuration directory. This function will be :ref:`automatically loaded <syntax-function-autoloading>` by current and future fish sessions. This can be useful if you have interactively created a new function and wish to save it for later use.
Note that because fish loads functions on-demand, saved functions will not function as :ref:`event handlers <event>` until they are run or sourced otherwise. To activate an event handler for every new shell, add the function to your :ref:`shell initialization file <initialization>` instead of using ``funcsave``.