mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-30 14:24:35 +08:00
b6e8171f01
darcs-hash:20060831154400-ac50b-dddbee79481e0e0a8da9fc025e8a15c466460a2f.gz
28 lines
1.4 KiB
Plaintext
28 lines
1.4 KiB
Plaintext
\section functions functions - print or erase functions
|
|
|
|
\subsection function-synopsis Synopsis
|
|
<code>functions [-e] FUNCTIONS...</code>
|
|
|
|
\subsection functions-description Description
|
|
|
|
This builtin command is used to print or erase functions.
|
|
|
|
- <code>-a</code> or <code>--all</code> list all functions, even those whose name start with an underscore.
|
|
- <code>-d DESCRIPTION</code> or <code>--description=DESCRIPTION</code> change the description of this function
|
|
- <code>-e</code> or <code>--erase</code> causes the specified functions to be erased.
|
|
- <code>-h</code> or <code>--help</code> display a help message and exit
|
|
- <code>-n</code> or <code>--names</code> list only the names of all defined functions, not their definition
|
|
- <code>-q</code> or <code>--query</code> test if the specified functions exist. Does not output anything, but the builtins exit status is the number of functions specified that were not defined.
|
|
|
|
The default behavior of \c functions when called with no arguments,
|
|
is to print the names and definitions of all defined functions. If any
|
|
non-switch parameters are given, only the definition of the specified
|
|
functions are printed.
|
|
|
|
Automatically loaded functions can not be removed using functions
|
|
-e. Either remove the definition file or change the
|
|
$fish_function_path variable to remove autoloaded functions.
|
|
|
|
The exit status of the functions builtin is the number functions
|
|
specified in the argument list that do not exist.
|