Update docs, completions for funcsave

Remove long opt for -q, funcsave does not have so many options that
it's any help.
This commit is contained in:
Aaron Gyes
2021-09-29 03:08:10 -07:00
parent fb32872f6b
commit ed8c78c0ea
3 changed files with 9 additions and 7 deletions

View File

@@ -9,14 +9,14 @@ Synopsis
::
funcsave FUNCTION_NAME
funcsave [(-d | --directory) where/to/save ] FUNCTION_NAME
funcsave [-q] [(-d | --directory) DIR ] FUNCTION_NAME
Description
-----------
``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.
``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 to commit functions created interactively for permanent 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:`configuration file <configuration>` instead of using ``funcsave``.
Because fish loads functions on-demand, saved functions cannot serve as :ref:`event handlers <event>` until they are run or otherwise sourced. To activate an event handler for every new shell, add the function to the :ref:`configuration file <configuration>` 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.
This is often used after :ref:`funced <cmd-funced>`, which opens the function in ``$EDITOR`` or ``$VISUAL`` and loads it into the current session afterwards.