EMIT(1)

πŸ‘‘ EMIT(1) β€” the fish-shell girlies' guide to firing events πŸ’…

okay so real talk, this is emit from fish-shell, and it's genuinely one of the most underrated little commands ever. let's get into it 🫢


✨ NAME ✨

emit β€” emits a generic event. that's it. that's the whole job. and she does it flawlessly πŸ’–


🌸 SYNOPSIS 🌸

emit EVENT_NAME [ARGUMENTS ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so emit emits, aka fires, an event. think of it like tossing a vibe into the group chat πŸ’Œ

events get delivered to β€” or "caught by" β€” special functions called event handlers (fish has a whole thing about events, iykyk). and the arguments you pass along? they get handed straight to those event handlers as function arguments. no cap, that's literally it. it's giving perfect messenger energy ✨

also bestie, the --help or -h option displays help about using this command. iconic of her, honestly πŸŽ€


πŸ”₯ EXAMPLE πŸ”₯

the following code first defines an event handler for the generic event named 'test_event', and then emits an event of that type. watch and learn πŸ‘‘

function event_test --on-event test_event
    echo event test: $argv
end

emit test_event something

likeβ€” the way that --on-event test_event just snaps that function into place as a handler? obsessed. then emit test_event something fires it and something rides along as $argv. main character behavior fr fr πŸ’€πŸ’–


πŸ’œ NOTES πŸ’œ

heads up bestie: events are only sent to the current fish process, because there is no way to send events from one fish process to another. so no cross-process telepathy, sadly 😭 she's loyal to her own process only.

fish-shell developers πŸ’–


and that's the whole page, babes 🌈 β€” brought to you by fish-shell 4.9, dated Sep 08, 2026, lovingly copyrighted by the fish-shell developers. go forth and emit responsibly πŸ§šβ€β™€οΈβœ¨πŸŽ€

πŸ“¦ 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