FUNCED(1)
π funced β like, the fish-shell manual, section 1, bestie π
okay so real talk, this page is from the fish-shell manual, section 1, and it's all about a little command called funced. sit down, grab a strawberry π, we're gonna edit some functions together.
β¨ NAME β¨
funced β edit a function interactively. that's it, that's the vibe. π
β¨ SYNOPSIS β¨
funced [OPTIONS] NAME
β¨ DESCRIPTION β¨
okay so funced is literally your little doorway into editing the definition of the function NAME. it gives you an interface to do that, no cap. π
here's the tea on which editor it picks β listen up:
- if the
$VISUALenvironment variable is set, that is the program it uses to edit the function. - if
$VISUALis unset but$EDITORis set, then$EDITORgets the job. - otherwise? a built-in editor is used. iconic, self-sufficient, main character energy. π
β οΈ tiny but crucial thing about the built-in editor: to enter a literal newline you press alt+enter. pressing enter signals that you're done editing the function. this does not apply to an external editor likeemacsorvimβ those do their own thing, bestie.
and here's something lowkey important: funced will try to edit the original file that a function is defined in β which might include variable definitions or helper functions as well. if changes can't be saved to the original file, a copy gets created in the user's function directory. so it's flexible like that. π¦
if there's no function called NAME? no worries, a brand new function will be created with the specified name. new function, new you. β¨
π OPTIONS π
-e command,--editor commandβ opens the function body inside the text editor given by command (for example,-e vi). the special commandfishuses the built-in editor β same as specifying-i. π§-i,--interactiveβ forces opening the function body in the built-in editor even if$VISUALor$EDITORis defined. built-in editor said not today to your env vars. π-s,--saveβ automatically saves the function after successfully editing it. no extra step, we love efficiency. π«Ά-h,--helpβ displays help about using this command. classic. πΈ
π EXAMPLE π
say you want to modify your prompt. (yes, your prompt. the thing you stare at all day. give it a glow-up.)
run:
>_ funced fish_prompt
this will open up your editor, allowing you to modify the function. when you're done, save and quit. fish will reload the function, so you should see the changes right away. obsessed. π₯
when you're done, use:
>_ funcsave fish_prompt
for more, see funcsave <>. to view a function's current definition, use functions <> or type <>. iykyk. β
π Copyright π
fish-shell developers β they made it, we're just vibing in it. π
sign-off szn πΈ this page came to you courtesy of the fish-shell developers, version 4.9, dated Sep 08, 2026. go edit a function, bestie, you got this. π¦β¨π
π¦ 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