GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
FUNCSAVE(1) fish-shell FUNCSAVE(1)

funcsave - save the definition of a function to the user's autoload directory

funcsave FUNCTION_NAME
funcsave [-q | --quiet] [(-d | --directory) DIR] FUNCTION_NAME

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 to commit functions created interactively for permanent use.

If you have erased a function using functions's --erase option, funcsave will remove the saved function definition.

Because fish loads functions on-demand, saved functions cannot serve as event handlers until they are run or otherwise sourced. To activate an event handler for every new shell, add the function to the configuration file instead of using funcsave.

This is often used after funced, which opens the function in $EDITOR or $VISUAL and loads it into the current session afterwards.

To view a function's current definition, use functions or type.

2024, fish-shell developers

July 5, 2025 4.0

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.