/usr/share/fish/man/man1/trap.1 is in fish-common 2.4.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | .TH "trap" 1 "Sun Dec 11 2016" "Version 2.4.0" "fish" \" -*- nroff -*-
.ad l
.nh
.SH NAME
\fBtrap\fP -- perform an action when the shell receives a signal
.PP
.SS "Synopsis"
.PP
.nf
\fBtrap\fP [OPTIONS] [[ARG] SIGSPEC \&.\&.\&. ]
.fi
.PP
.SS "Description"
\fCtrap\fP 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 \fCevent handler\fP\&.
.PP
The following parameters are available:
.PP
.IP "\(bu" 2
\fCARG\fP is the command to be executed on signal delivery\&.
.IP "\(bu" 2
\fCSIGSPEC\fP is the name of the signal to trap\&.
.IP "\(bu" 2
\fC-l\fP or \fC--list-signals\fP prints a list of signal names\&.
.IP "\(bu" 2
\fC-p\fP or \fC--print\fP prints all defined signal handlers\&.
.PP
.PP
If \fCARG\fP and \fCSIGSPEC\fP are both specified, \fCARG\fP is the command to be executed when the signal specified by \fCSIGSPEC\fP is delivered\&.
.PP
If \fCARG\fP 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 \fCARG\fP is the null string the signal specified by each \fCSIGSPEC\fP is ignored by the shell and by the commands it invokes\&.
.PP
If \fCARG\fP is not present and \fC-p\fP has been supplied, then the trap commands associated with each \fCSIGSPEC\fP are displayed\&. If no arguments are supplied or if only \fC-p\fP is given, \fCtrap\fP prints the list of commands associated with each signal\&.
.PP
Signal names are case insensitive and the \fCSIG\fP prefix is optional\&.
.PP
The return status is 1 if any \fCSIGSPEC\fP is invalid; otherwise trap returns 0\&.
.SS "Example"
.PP
.nf
\fBtrap\fP 'status --print-stack-trace' SIGUSR1
Prints a stack trace each time the SIGUSR1 signal is sent to the shell\&.
.fi
.PP
|