aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/function.txt
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-06-09 09:58:11 +1000
committerGravatar axel <axel@liljencrantz.se>2006-06-09 09:58:11 +1000
commitd79e8c7f62472c5f47871d1ad8351ce848b2c6b4 (patch)
treecaf23bc67fde6a3708634ab335c46af626c4401b /doc_src/function.txt
parentaf8cb6fe875898d9a8c2254361bed04583c35961 (diff)
Documentation updates, mostly corrections and cla<rifications to the docs for a few builtins
darcs-hash:20060608235811-ac50b-76b4fd54cb0911dd00f19f4a7c761f188d6ca068.gz
Diffstat (limited to 'doc_src/function.txt')
-rw-r--r--doc_src/function.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc_src/function.txt b/doc_src/function.txt
index 6d121cb7..612b663b 100644
--- a/doc_src/function.txt
+++ b/doc_src/function.txt
@@ -1,16 +1,16 @@
\section function function - create a function
\subsection function-synopsis Synopsis
- <tt>function [OPTIONS] NAME; BODY; end </tt>
+ <code>function [OPTIONS] NAME; BODY; end </code>
\subsection function-description Description
- \c -b or \c --key-binding specifies that the function is a key biding. Key binding functions work exactly like regular functions except that they can not be tab-completed, and may contain the '-' character.
-- <tt>-d DESCRIPTION</tt> or \c --description=DESCRIPTION is a description of what the function does, suitable as a completion description
-- <tt>-j PID</tt> or <tt> --on-job-exit PID</tt> tells fish to run this function when the job with group id PID exits
-- <tt>-p PID</tt> or <tt> --on-process-exit PID</tt> tells fish to run this function when the fish child process with process id PID exits
-- <tt>-s</tt> or <tt>--on-signal SIGSPEC</tt> tells fish to run this function when the signal SIGSPEC is delivered. SIGSPEC can be a signal number, or the signal name, such as SIGHUP (or just HUP)
-- <tt>-v</tt> or <tt>--on-variable VARIABLE_NAME</tt> tells fish to run this function when the variable VARIABLE_NAME changes value
+- <code>-d DESCRIPTION</code> or \c --description=DESCRIPTION is a description of what the function does, suitable as a completion description
+- <code>-j PID</code> or <code> --on-job-exit PID</code> tells fish to run this function when the job with group id PID exits
+- <code>-p PID</code> or <code> --on-process-exit PID</code> tells fish to run this function when the fish child process with process id PID exits
+- <code>-s</code> or <code>--on-signal SIGSPEC</code> tells fish to run this function when the signal SIGSPEC is delivered. SIGSPEC can be a signal number, or the signal name, such as SIGHUP (or just HUP)
+- <code>-v</code> or <code>--on-variable VARIABLE_NAME</code> tells fish to run this function when the variable VARIABLE_NAME changes value
This builtin command is used to create a new function. A Function is a
list of commands that will be executed when the name of the function
@@ -22,7 +22,7 @@ function hi
end
</pre>
-will write <tt>hello</tt> whenever the user enters \c hi.
+will write <code>hello</code> whenever the user enters \c hi.
If the user enters any additional arguments after the function, they
are inserted into the environment variable <a href="index.html#variables-arrays">array</a> argv.