aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/index.hdr.in
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2015-08-10 18:52:37 +0200
committerGravatar Fabian Homborg <FHomborg@gmail.com>2015-09-11 11:33:04 +0200
commit9828d787fa48686e6bbf3189eedeefd0937d7857 (patch)
tree9da9043c170ea86627f1464dd1e6a3adfeedc1e9 /doc_src/index.hdr.in
parent53456b5fc3932784edfc009a6f96aa3fcb499ec4 (diff)
Document problems with event handlers and autoloading
Fixes #845.
Diffstat (limited to 'doc_src/index.hdr.in')
-rw-r--r--doc_src/index.hdr.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in
index ac85e427..978a9845 100644
--- a/doc_src/index.hdr.in
+++ b/doc_src/index.hdr.in
@@ -251,6 +251,8 @@ The default value for `$fish_function_path` is `~/.config/fish/functions` `/etc/
It is very important that function definition files only contain the definition for the specified function and nothing else. Otherwise, it is possible that autoloading a function files requires that the function already be loaded, which creates a circular dependency.
+Autoloading also won't work for <a href=#event>event handlers</a>, since fish cannot know that a function is supposed to be executed when an event occurs when it hasn't yet loaded the function.
+
\subsubsection syntax-conditional Conditional execution of code and flow control
@@ -1113,6 +1115,8 @@ function --on-signal WINCH my_signal_handler
end
\endfish
+Please note that event handlers only become active when a function is loaded which means you might need to manually <a href='commands.html#source'>source</a> a function's file instead of relying on <a href=#syntax-function-autoloading>autoloading</a>.
+
For more information on how to define new event handlers, see the documentation for the <a href='commands.html#function'>function</a> command.