/usr/share/fish/man/man1/functions.1 is in fish-common 2.4.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | .TH "functions" 1 "Sun Dec 11 2016" "Version 2.4.0" "fish" \" -*- nroff -*-
.ad l
.nh
.SH NAME
\fBfunctions\fP -- print or erase functions
.PP
.SS "Synopsis"
.PP
.nf
\fBfunctions\fP [ -a | --all ] [ -n | --names ]
\fBfunctions\fP -c OLDNAME NEWNAME
\fBfunctions\fP -d DESCRIPTION FUNCTION
\fBfunctions\fP [ -e | -q ] FUNCTIONS\&.\&.\&.
.fi
.PP
.SS "Description"
\fCfunctions\fP prints or erases functions\&.
.PP
The following options are available:
.PP
.IP "\(bu" 2
\fC-a\fP or \fC--all\fP lists all functions, even those whose name start with an underscore\&.
.IP "\(bu" 2
\fC-c OLDNAME NEWNAME\fP or \fC--copy OLDNAME NEWNAME\fP creates a new function named NEWNAME, using the definition of the OLDNAME function\&.
.IP "\(bu" 2
\fC-d DESCRIPTION\fP or \fC--description=DESCRIPTION\fP changes the description of this function\&.
.IP "\(bu" 2
\fC-e\fP or \fC--erase\fP causes the specified functions to be erased\&.
.IP "\(bu" 2
\fC-n\fP or \fC--names\fP lists the names of all defined functions\&.
.IP "\(bu" 2
\fC-q\fP or \fC--query\fP tests if the specified functions exist\&.
.PP
.PP
The default behavior of \fCfunctions\fP, when called with no arguments, is to print the names of all defined functions\&. Unless the \fC-a\fP option is given, no functions starting with underscores are not included in the output\&.
.PP
If any non-option parameters are given, the definition of the specified functions are printed\&.
.PP
Automatically loaded functions cannot be removed using \fCfunctions -e\fP\&. Either remove the definition file or change the $fish_function_path variable to remove autoloaded functions\&.
.PP
Copying a function using \fC-c\fP copies only the body of the function, and does not attach any event notifications from the original function\&.
.PP
Only one function's description can be changed in a single invocation of \fCfunctions -d\fP\&.
.PP
The exit status of \fCfunctions\fP is the number of functions specified in the argument list that do not exist, which can be used in concert with the \fC-q\fP option\&.
.SS "Examples"
.PP
.nf
\fBfunctions\fP -n
Displays a list of currently-defined functions
.fi
.PP
.PP
.PP
.nf
\fBfunctions\fP -c foo bar
Copies the 'foo' function to a new function called 'bar'
.fi
.PP
.PP
.PP
.nf
\fBfunctions\fP -e bar
Erases the function \fCbar\fP
.fi
.PP
|