.\" Man page generated from reStructuredText .\" by the Docutils 0.23 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "EMIT" "1" "Oct 15, 2026" "4.9" "fish-shell" .SH NAME emit \- emit a generic event .SH SYNOPSIS .nf \fBemit\fP \fIEVENT_NAME\fP [\fIARGUMENTS\fP \&...] .fi .sp .SH DESCRIPTION .sp \fBemit\fP emits, or fires, an event. Events are delivered to, or caught by, special functions called event handlers \%<#\:event>\&. The arguments are passed to the event handlers as function arguments. .sp The \fB\-\-help\fP or \fB\-h\fP option displays help about using this command. .SH EXAMPLE .sp The following code first defines an event handler for the generic event named \(aqtest_event\(aq, and then emits an event of that type. .INDENT 0.0 .INDENT 3.5 .sp .EX function event_test \-\-on\-event test_event echo event test: $argv end emit test_event something .EE .UNINDENT .UNINDENT .SH NOTES .sp Note that events are only sent to the current fish process as there is no way to send events from one fish process to another. .SH Copyright fish-shell developers .\" End of generated man page.