fish-shell/doc_src/emit.txt

21 lines
626 B
Text
Raw Normal View History

\section emit emit - Emit a generic event
\subsection block-synopsis Synopsis
2012-12-20 00:11:55 +00:00
<tt>emit EVENT_NAME [ARGUMENTS...]</tt>
\subsection emit-description Description
\c emit emits, or fires, an event. Events are delivered to, or caught by, special functions called event handlers. The arguments are passed to the event handlers as function arguments.
\subsection emit-example Example
The following code first defines an event handler for the generic
event named 'test_event', and then emits an event of that type.
<pre>function event_test --on-event test_event
2012-12-20 00:11:55 +00:00
echo event test: $argv
end
2012-12-20 00:11:55 +00:00
emit test_event something
</pre>