.\" Man page generated from reStructuredText .\" by the Docutils 0.23 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "FUNCSAVE" "1" "Oct 12, 2026" "4.9" "fish-shell" .SH NAME funcsave \- save the definition of a function to the user's autoload directory .SH SYNOPSIS .nf \fBfuncsave\fP \fIFUNCTION_NAME\fP \fBfuncsave\fP [\fB\-q\fP | \fB\-\-quiet\fP] [(\fB\-d\fP | \fB\-\-directory\fP) \fIDIR\fP] \fIFUNCTION_NAME\fP .fi .sp .SH DESCRIPTION .sp \fBfuncsave\fP saves a function to a file in the fish configuration directory. This function will be automatically loaded \%<#\:syntax-function-autoloading> by current and future fish sessions. This can be useful to commit functions created interactively for permanent use. .sp If you have erased a function using functions \%<>\(aqs \fB\-\-erase\fP option, \fBfuncsave\fP will remove the saved function definition. .sp Because fish loads functions on\-demand, saved functions cannot serve as event handlers \%<#\:event> until they are run or otherwise sourced. To activate an event handler for every new shell, add the function to the configuration file \%<#\:configuration> instead of using \fBfuncsave\fP\&. .sp This is often used after funced \%<>, which opens the function in \fB$EDITOR\fP or \fB$VISUAL\fP and loads it into the current session afterwards. .sp To view a function\(aqs current definition, use functions \%<> or type \%<>\&. .SH Copyright fish-shell developers .\" End of generated man page.