Document funced/funcsave harder

[ci skip]
This commit is contained in:
Fabian Homborg
2020-03-19 17:59:25 +01:00
parent 179d92452d
commit 06b317c07f
3 changed files with 29 additions and 1 deletions

View File

@@ -14,6 +14,8 @@ Synopsis
Description
-----------
``funcsave`` saves the current definition of 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 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.
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``.
This is typically used together with :ref:`funced <cmd-funced>`, which will open the function in your editor and load it in the current seession afterwards.