diff options
author | Jan Kanis <jan.code@jankanis.nl> | 2012-12-20 01:11:55 +0100 |
---|---|---|
committer | Jan Kanis <jan.code@jankanis.nl> | 2012-12-20 16:13:00 +0100 |
commit | af3059ab2ad4ccbfec3c0789b198388cc90fbcbb (patch) | |
tree | 053a7fd1e81254acfa5406f08976ca5059f152d9 /doc_src/emit.txt | |
parent | 1f0ae8b06d7e10d2a12cfd28efb3032af7b4d2f1 (diff) |
Allow 'emit' to accept event arguments
Diffstat (limited to 'doc_src/emit.txt')
-rw-r--r-- | doc_src/emit.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc_src/emit.txt b/doc_src/emit.txt index f2821748..c0faab82 100644 --- a/doc_src/emit.txt +++ b/doc_src/emit.txt @@ -1,11 +1,11 @@ \section emit emit - Emit a generic event \subsection block-synopsis Synopsis - <tt>emit EVENT_NAME</tt> + <tt>emit EVENT_NAME [ARGUMENTS...]</tt> \subsection emit-description Description -The emit builtin fires a generic fish event. Such events can be caught by special functions called event handlers. +The emit builtin fires a generic fish event. Such events can be caught by special functions called event handlers. The arguments are passed to the event handlers as function arguments. \subsection emit-example Example @@ -13,7 +13,8 @@ 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 - echo event test!!! + echo event test: $argv end -emit test_event</pre>
\ No newline at end of file +emit test_event something +</pre> |