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.
β Copyright β
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