This file is indexed.

/usr/share/fish/man/man1/if.1 is in fish-common 2.2.0-3.

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
.TH "if" 1 "Wed Dec 16 2015" "Version 2.2.0" "fish" \" -*- nroff -*-
.ad l
.nh
.SH NAME
\fBif\fP -- conditionally execute a command 

.PP
.SS "Synopsis"
.PP
.nf

\fBif\fP CONDITION; COMMANDS_TRUE\&.\&.\&.;
[\fBelse\fP \fBif\fP CONDITION2; COMMANDS_TRUE2\&.\&.\&.;]
[\fBelse\fP; COMMANDS_FALSE\&.\&.\&.;]
\fBend\fP
.fi
.PP
.SS "Description"
\fCif\fP will execute the command \fCCONDITION\fP\&. If the condition's exit status is 0, the commands \fCCOMMANDS_TRUE\fP will execute\&. If the exit status is not 0 and \fCelse\fP is given, \fCCOMMANDS_FALSE\fP will be executed\&.
.PP
In order to use the exit status of multiple commands as the condition of an if block, use \fC\fCbegin; \&.\&.\&.; end\fP\fP and the short circuit commands \fC\fCand\fP\fP and \fC\fCor\fP\fP\&.
.PP
The exit status of the last foreground command to exit can always be accessed using the \fC$status\fP variable\&.
.SS "Example"
The following code will print \fCfoo\&.txt exists\fP if the file foo\&.txt exists and is a regular file, otherwise it will print \fCbar\&.txt exists\fP if the file bar\&.txt exists and is a regular file, otherwise it will print \fCfoo\&.txt and bar\&.txt do not exist\fP\&.
.PP
.PP
.nf

\fBif\fP \fBtest\fP -f foo\&.txt
    \fBecho\fP foo\&.txt exists
\fBelse\fP \fBif\fP \fBtest\fP -f bar\&.txt
    \fBecho\fP bar\&.txt exists
\fBelse\fP
    \fBecho\fP foo\&.txt and bar\&.txt do not exist
\fBend\fP
.fi
.PP