aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/emit.txt
diff options
context:
space:
mode:
authorGravatar liljencrantz <liljencrantz@gmail.com>2007-08-20 02:42:30 +1000
committerGravatar liljencrantz <liljencrantz@gmail.com>2007-08-20 02:42:30 +1000
commitad02bb9b4871bc053e36a01d603a592984ae1364 (patch)
tree10ef5919d19d96de6aca1866f8230e2475eb35cd /doc_src/emit.txt
parente464b4270cdfa7b085fc162d0ea6023e22a1f82e (diff)
Add a 'generic' type of event that can be emited from any piece of code or by the user. Use this event layer to perform interactive configuration startup at the correct time.
darcs-hash:20070819164230-75c98-f91b8a73de7bbbb500d80770ddf4d2d46ae592cc.gz
Diffstat (limited to 'doc_src/emit.txt')
-rw-r--r--doc_src/emit.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc_src/emit.txt b/doc_src/emit.txt
new file mode 100644
index 00000000..23143999
--- /dev/null
+++ b/doc_src/emit.txt
@@ -0,0 +1,23 @@
+\section emit emit - Emit a generic event
+
+\subsection block-synopsis Synopsis
+ <tt>emit EVENT_NAME</tt>
+
+\subsection emit-description Description
+
+The emit builtin fires a generic fish event. Such events can be caught by special functions called event handlers.
+
+\subsection emit-example Example
+
+The following code first defines an event handler for the generig
+event named 'test_event', and then emits an event of that type.
+
+<pre>
+function event_test --on-event test_event
+ echo event test!!!
+end
+
+emit test_event
+
+</pre>
+