FUNCSAVE(1)
β¨ FUNCSAVE(1) β¨ β fish-shell's little function-saving bestie
okay so real quick bestie, this is FUNCSAVE(1) from the fish-shell manual and it's genuinely one of the most underrated little commands ever. buckle up π
πΈ NAME πΈ
funcsave β saves the definition of a function to the user's autoload directory. that's it, that's the whole vibe π
π¦ SYNOPSIS π¦
funcsave FUNCTION_NAME
funcsave [-q | --quiet] [(-d | --directory) DIR] FUNCTION_NAME
so here's the tea on the flags π
-q,--quietβ shhh mode, it keeps things quiet π€«-d DIR,--directory DIRβ pick the directory (DIR) it saves into π
π DESCRIPTION π
so funcsave literally saves a function to a file in the fish configuration directory, and that function gets automatically loaded (that's the autoloading thing, iykyk) by your current and future fish sessions. no cap, this is so useful when you've been cooking up a function interactively and you want it to actually stick around permanently instead of vanishing the second you close the terminal π iconic behavior fr fr.
if you've already erased a function using functions's --erase option, then funcsave will remove the saved function definition. it cleans up after you, we love a tidy queen β¨
okay important caveat, don't skip this one π«Ά because fish loads functions on-demand, saved functions cannot serve as event handlers until they are run or otherwise sourced. so if you want an event handler to activate for every new shell, add the function to the configuration file instead of using funcsave. periodt π
this is often used after funced β which opens the function in $EDITOR or $VISUAL and then loads it into the current session afterwards. the combo is giving main character energy honestly π
and if you just want to view a function's current definition, use functions or type instead. no saving required, just vibes π
π Copyright π
fish-shell developers π§
so that's the whole page bestie, go save some functions π
β¨ and hey β this was fish-shell version 4.9, dated Sep 08, 2026, brought to you by the fish-shell developers. mwah, talk later ππ
π¦ where this page comes from
- arch rolling: fish 4.9.3-1 Β· GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms