diff options
author | Mark Griffiths <mark@thebespokepixel.com> | 2014-08-19 13:41:23 +0100 |
---|---|---|
committer | Mark Griffiths <mark@thebespokepixel.com> | 2014-09-03 14:43:26 +0100 |
commit | 137abd0cfaa8959224f88a4ebe9584a51468cc88 (patch) | |
tree | c396f760a1e309b5a837359e65c57c4555534d49 /doc_src/trap.txt | |
parent | d7308fecbe573aad91fc6f1377c1ed2df735f6fd (diff) |
Make line length, wrapping and spacing consistent
Diffstat (limited to 'doc_src/trap.txt')
-rw-r--r-- | doc_src/trap.txt | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/doc_src/trap.txt b/doc_src/trap.txt index 9c607ad4..3537e760 100644 --- a/doc_src/trap.txt +++ b/doc_src/trap.txt @@ -7,39 +7,32 @@ trap [OPTIONS] [[ARG] SIGSPEC ... ] \subsection trap-description Description -`trap` is a wrapper around the fish event delivery -framework. It exists for backwards compatibility with POSIX -shells. For other uses, it is recommended to define an <a -href='index.html#event'>event handler</a>. +`trap` is a wrapper around the fish event delivery framework. It exists for backwards compatibility with POSIX shells. For other uses, it is recommended to define an <a href='index.html#event'>event handler</a>. The following parameters are available: - `ARG` is the command to be executed on signal delivery. + - `SIGSPEC` is the name of the signal to trap. + - `-h` or `--help` displays help and exits. + - `-l` or `--list-signals` prints a list of signal names. + - `-p` or `--print` prints all defined signal handlers. -If `ARG` and `SIGSPEC` are both specified, `ARG` is the command to be -executed when the signal specified by `SIGSPEC` is delivered. +If `ARG` and `SIGSPEC` are both specified, `ARG` is the command to be executed when the signal specified by `SIGSPEC` is delivered. -If `ARG` is absent (and there is a single SIGSPEC) or -, each specified -signal is reset to its original disposition (the value it had upon -entrance to the shell). If `ARG` is the null string the signal -specified by each `SIGSPEC` is ignored by the shell and by the commands -it invokes. +If `ARG` is absent (and there is a single SIGSPEC) or -, each specified signal is reset to its original disposition (the value it had upon entrance to the shell). If `ARG` is the null string the signal specified by each `SIGSPEC` is ignored by the shell and by the commands it invokes. -If `ARG` is not present and `-p` has been supplied, then the trap commands -associated with each `SIGSPEC` are displayed. If no arguments are -supplied or if only `-p` is given, `trap` prints the list of commands -associated with each signal. +If `ARG` is not present and `-p` has been supplied, then the trap commands associated with each `SIGSPEC` are displayed. If no arguments are supplied or if only `-p` is given, `trap` prints the list of commands associated with each signal. Signal names are case insensitive and the `SIG` prefix is optional. -The return status is 1 if any `SIGSPEC` is invalid; otherwise trap -returns 0. +The return status is 1 if any `SIGSPEC` is invalid; otherwise trap returns 0. \subsection trap-example Example + \fish trap "status --print-stack-trace" SIGUSR1 # Prints a stack trace each time the SIGUSR1 signal is sent to the shell. |