manbook 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +25 -0
- data/LICENSE.txt +20 -0
- data/README.md +105 -0
- data/Rakefile +46 -0
- data/TODO +2 -0
- data/VERSION +1 -0
- data/bin/manbook +89 -0
- data/bin/mktoc +157 -0
- data/lib/manbook.rb +30 -0
- data/lib/manbook/errors.rb +22 -0
- data/lib/manbook/formatter.rb +27 -0
- data/lib/manbook/html_formatter.rb +17 -0
- data/lib/manbook/log_formatter.rb +9 -0
- data/lib/manbook/parser.rb +32 -0
- data/templates/_page.html.erb +1 -0
- data/templates/about.html.erb +6 -0
- data/templates/application.html.erb +23 -0
- data/templates/index.html.erb +4 -0
- data/templates/library_books.jpg +0 -0
- data/templates/manbook.ncx.erb +28 -0
- data/templates/manbook.opf.erb +35 -0
- data/test/fixtures/bash.html +11352 -0
- data/test/fixtures/cat.html +195 -0
- data/test/fixtures/git.html +1882 -0
- data/test/fixtures/gunzip.html +595 -0
- data/test/fixtures/less.html +3554 -0
- data/test/fixtures/ls.html +818 -0
- data/test/fixtures/man.html +649 -0
- data/test/helper.rb +42 -0
- data/test/unit/test_manbook.rb +39 -0
- data/test/unit/test_mktoc.rb +215 -0
- metadata +189 -0
@@ -0,0 +1,649 @@
|
|
1
|
+
<!-- Creator : groff version 1.19.2 -->
|
2
|
+
<!-- CreationDate: Tue Nov 29 21:01:36 2011 -->
|
3
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/html4/loose.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
9
|
+
<meta name="Content-Style" content="text/css">
|
10
|
+
<style type="text/css">
|
11
|
+
p { margin-top: 0; margin-bottom: 0; }
|
12
|
+
pre { margin-top: 0; margin-bottom: 0; }
|
13
|
+
table { margin-top: 0; margin-bottom: 0; }
|
14
|
+
</style>
|
15
|
+
<title>man</title>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
|
20
|
+
<h1 align=center>man</h1>
|
21
|
+
|
22
|
+
<a href="#NAME">NAME</a><br>
|
23
|
+
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
24
|
+
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
25
|
+
<a href="#OPTIONS">OPTIONS</a><br>
|
26
|
+
<a href="#CAT PAGES">CAT PAGES</a><br>
|
27
|
+
<a href="#HTML PAGES">HTML PAGES</a><br>
|
28
|
+
<a href="#SEARCH PATH FOR MANUAL PAGES">SEARCH PATH FOR MANUAL PAGES</a><br>
|
29
|
+
<a href="#ENVIRONMENT">ENVIRONMENT</a><br>
|
30
|
+
<a href="#BUGS">BUGS</a><br>
|
31
|
+
<a href="#TIPS">TIPS</a><br>
|
32
|
+
<a href="#AUTHOR">AUTHOR</a><br>
|
33
|
+
<a href="#SEE ALSO">SEE ALSO</a><br>
|
34
|
+
|
35
|
+
<hr>
|
36
|
+
|
37
|
+
|
38
|
+
<a name="NAME"></a>
|
39
|
+
<h2>NAME</h2>
|
40
|
+
|
41
|
+
|
42
|
+
<p style="margin-left:11%; margin-top: 1em">man −
|
43
|
+
format and display the on-line manual pages</p>
|
44
|
+
|
45
|
+
<a name="SYNOPSIS"></a>
|
46
|
+
<h2>SYNOPSIS</h2>
|
47
|
+
|
48
|
+
|
49
|
+
<p style="margin-left:11%; margin-top: 1em"><b>man</b>
|
50
|
+
[<b>−acdfFhkKtwW</b>] [<b>--path</b>] [<b>−m</b>
|
51
|
+
<i>system</i>] [<b>−p</b> <i>string</i>]
|
52
|
+
[<b>−C</b> <i>config_file</i>] [<b>−M</b>
|
53
|
+
<i>pathlist</i>] [<b>−P</b> <i>pager</i>]
|
54
|
+
[<b>−B</b> <i>browser</i>] [<b>−H</b>
|
55
|
+
<i>htmlpager</i>] [<b>−S</b> <i>section_list</i>]
|
56
|
+
[<i>section</i>] <i>name ...</i></p>
|
57
|
+
|
58
|
+
<a name="DESCRIPTION"></a>
|
59
|
+
<h2>DESCRIPTION</h2>
|
60
|
+
|
61
|
+
|
62
|
+
<p style="margin-left:11%; margin-top: 1em"><b>man</b>
|
63
|
+
formats and displays the on-line manual pages. If you
|
64
|
+
specify <i>section</i>, <b>man</b> only looks in that
|
65
|
+
section of the manual. <i>name</i> is normally the name of
|
66
|
+
the manual page, which is typically the name of a command,
|
67
|
+
function, or file. However, if <i>name</i> contains a slash
|
68
|
+
(<b>/</b>) then <b>man</b> interprets it as a file
|
69
|
+
specification, so that you can do <b>man ./foo.5</b> or even
|
70
|
+
<b>man /cd/foo/bar.1.gz</b>.</p>
|
71
|
+
|
72
|
+
<p style="margin-left:11%; margin-top: 1em">See below for a
|
73
|
+
description of where <b>man</b> looks for the manual page
|
74
|
+
files.</p>
|
75
|
+
|
76
|
+
<a name="OPTIONS"></a>
|
77
|
+
<h2>OPTIONS</h2>
|
78
|
+
|
79
|
+
|
80
|
+
<p style="margin-left:11%; margin-top: 1em"><b>−C
|
81
|
+
config_file</b></p>
|
82
|
+
|
83
|
+
<p style="margin-left:22%;">Specify the configuration file
|
84
|
+
to use; the default is <b>/private/etc/man.conf</b>. (See
|
85
|
+
<b>man.conf</b>(5).)</p>
|
86
|
+
|
87
|
+
<p style="margin-left:11%;"><b>−M path</b></p>
|
88
|
+
|
89
|
+
<p style="margin-left:22%;">Specify the list of directories
|
90
|
+
to search for man pages. Separate the directories with
|
91
|
+
colons. An empty list is the same as not specifying
|
92
|
+
<b>−M</b> at all. See <b>SEARCH PATH FOR MANUAL
|
93
|
+
PAGES</b>.</p>
|
94
|
+
|
95
|
+
<p style="margin-left:11%;"><b>−P pager</b></p>
|
96
|
+
|
97
|
+
<p style="margin-left:22%;">Specify which pager to use.
|
98
|
+
This option overrides the <b>MANPAGER</b> environment
|
99
|
+
variable, which in turn overrides the <b>PAGER</b> variable.
|
100
|
+
By default, <b>man</b> uses <b>/usr/bin/less -is</b>.</p>
|
101
|
+
|
102
|
+
<table width="100%" border=0 rules="none" frame="void"
|
103
|
+
cellspacing="0" cellpadding="0">
|
104
|
+
<tr valign="top" align="left">
|
105
|
+
<td width="11%"></td>
|
106
|
+
<td width="3%">
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<p style="margin-top: 1em" valign="top"><b>−B</b></p> </td>
|
111
|
+
<td width="8%"></td>
|
112
|
+
<td width="78%">
|
113
|
+
|
114
|
+
|
115
|
+
<p style="margin-top: 1em" valign="top">Specify which
|
116
|
+
browser to use on HTML files. This option overrides the
|
117
|
+
<b>BROWSER</b> environment variable. By default, <b>man</b>
|
118
|
+
uses <b>/usr/bin/less</b>-is<b>,</b></p></td>
|
119
|
+
<tr valign="top" align="left">
|
120
|
+
<td width="11%"></td>
|
121
|
+
<td width="3%">
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<p style="margin-top: 1em" valign="top"><b>−H</b></p> </td>
|
126
|
+
<td width="8%"></td>
|
127
|
+
<td width="78%">
|
128
|
+
|
129
|
+
|
130
|
+
<p style="margin-top: 1em" valign="top">Specify a command
|
131
|
+
that renders HTML files as text. This option overrides the
|
132
|
+
<b>HTMLPAGER</b> environment variable. By default,
|
133
|
+
<b>man</b> uses <b>/bin/cat</b>,</p></td>
|
134
|
+
</table>
|
135
|
+
|
136
|
+
<p style="margin-left:11%;"><b>−S
|
137
|
+
section_list</b></p>
|
138
|
+
|
139
|
+
<p style="margin-left:22%;">List is a colon separated list
|
140
|
+
of manual sections to search. This option overrides the
|
141
|
+
<b>MANSECT</b> environment variable.</p>
|
142
|
+
|
143
|
+
<table width="100%" border=0 rules="none" frame="void"
|
144
|
+
cellspacing="0" cellpadding="0">
|
145
|
+
<tr valign="top" align="left">
|
146
|
+
<td width="11%"></td>
|
147
|
+
<td width="3%">
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
<p style="margin-top: 1em" valign="top"><b>−a</b></p> </td>
|
152
|
+
<td width="8%"></td>
|
153
|
+
<td width="78%">
|
154
|
+
|
155
|
+
|
156
|
+
<p style="margin-top: 1em" valign="top">By default,
|
157
|
+
<b>man</b> will exit after displaying the first manual page
|
158
|
+
it finds. Using this option forces <b>man</b> to display all
|
159
|
+
the manual pages that match <b>name,</b> not just the
|
160
|
+
first.</p> </td>
|
161
|
+
<tr valign="top" align="left">
|
162
|
+
<td width="11%"></td>
|
163
|
+
<td width="3%">
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<p style="margin-top: 1em" valign="top"><b>−c</b></p> </td>
|
168
|
+
<td width="8%"></td>
|
169
|
+
<td width="78%">
|
170
|
+
|
171
|
+
|
172
|
+
<p style="margin-top: 1em" valign="top">Reformat the source
|
173
|
+
man page, even when an up-to-date cat page exists. This can
|
174
|
+
be meaningful if the cat page was formatted for a screen
|
175
|
+
with a different number of columns, or if the preformatted
|
176
|
+
page is corrupted.</p></td>
|
177
|
+
<tr valign="top" align="left">
|
178
|
+
<td width="11%"></td>
|
179
|
+
<td width="3%">
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
<p style="margin-top: 1em" valign="top"><b>−d</b></p> </td>
|
184
|
+
<td width="8%"></td>
|
185
|
+
<td width="78%">
|
186
|
+
|
187
|
+
|
188
|
+
<p style="margin-top: 1em" valign="top">Don’t
|
189
|
+
actually display the man pages, but do print gobs of
|
190
|
+
debugging information.</p></td>
|
191
|
+
<tr valign="top" align="left">
|
192
|
+
<td width="11%"></td>
|
193
|
+
<td width="3%">
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<p style="margin-top: 1em" valign="top"><b>−D</b></p> </td>
|
198
|
+
<td width="8%"></td>
|
199
|
+
<td width="78%">
|
200
|
+
|
201
|
+
|
202
|
+
<p style="margin-top: 1em" valign="top">Both display and
|
203
|
+
print debugging info.</p></td>
|
204
|
+
<tr valign="top" align="left">
|
205
|
+
<td width="11%"></td>
|
206
|
+
<td width="3%">
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<p style="margin-top: 1em" valign="top"><b>−f</b></p> </td>
|
211
|
+
<td width="8%"></td>
|
212
|
+
<td width="78%">
|
213
|
+
|
214
|
+
|
215
|
+
<p style="margin-top: 1em" valign="top">Equivalent to
|
216
|
+
<b>whatis</b>.</p> </td>
|
217
|
+
</table>
|
218
|
+
|
219
|
+
<p style="margin-left:11%;"><b>−F</b> or
|
220
|
+
<b>−−preformat</b></p>
|
221
|
+
|
222
|
+
<p style="margin-left:22%;">Format only - do not
|
223
|
+
display.</p>
|
224
|
+
|
225
|
+
<table width="100%" border=0 rules="none" frame="void"
|
226
|
+
cellspacing="0" cellpadding="0">
|
227
|
+
<tr valign="top" align="left">
|
228
|
+
<td width="11%"></td>
|
229
|
+
<td width="3%">
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<p style="margin-top: 1em" valign="top"><b>−h</b></p> </td>
|
234
|
+
<td width="8%"></td>
|
235
|
+
<td width="78%">
|
236
|
+
|
237
|
+
|
238
|
+
<p style="margin-top: 1em" valign="top">Print a help
|
239
|
+
message and exit.</p></td>
|
240
|
+
<tr valign="top" align="left">
|
241
|
+
<td width="11%"></td>
|
242
|
+
<td width="3%">
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
<p style="margin-top: 1em" valign="top"><b>−k</b></p> </td>
|
247
|
+
<td width="8%"></td>
|
248
|
+
<td width="78%">
|
249
|
+
|
250
|
+
|
251
|
+
<p style="margin-top: 1em" valign="top">Equivalent to
|
252
|
+
<b>apropos</b>.</p> </td>
|
253
|
+
<tr valign="top" align="left">
|
254
|
+
<td width="11%"></td>
|
255
|
+
<td width="3%">
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
<p style="margin-top: 1em" valign="top"><b>−K</b></p> </td>
|
260
|
+
<td width="8%"></td>
|
261
|
+
<td width="78%">
|
262
|
+
|
263
|
+
|
264
|
+
<p style="margin-top: 1em" valign="top">Search for the
|
265
|
+
specified string in *all* man pages. Warning: this is
|
266
|
+
probably very slow! It helps to specify a section. (Just to
|
267
|
+
give a rough idea, on my machine this takes about a minute
|
268
|
+
per 500 man pages.)</p></td>
|
269
|
+
</table>
|
270
|
+
|
271
|
+
<p style="margin-left:11%;"><b>−m system</b></p>
|
272
|
+
|
273
|
+
<p style="margin-left:22%;">Specify an alternate set of man
|
274
|
+
pages to search based on the system name given.</p>
|
275
|
+
|
276
|
+
<p style="margin-left:11%;"><b>−p string</b></p>
|
277
|
+
|
278
|
+
<p style="margin-left:22%;">Specify the sequence of
|
279
|
+
preprocessors to run before <b>nroff</b> or <b>troff</b>.
|
280
|
+
Not all installations will have a full set of preprocessors.
|
281
|
+
Some of the preprocessors and the letters used to designate
|
282
|
+
them are: eqn (e), grap (g), pic (p), tbl (t), vgrind (v),
|
283
|
+
refer (r). This option overrides the <b>MANROFFSEQ</b>
|
284
|
+
environment variable.</p>
|
285
|
+
|
286
|
+
<table width="100%" border=0 rules="none" frame="void"
|
287
|
+
cellspacing="0" cellpadding="0">
|
288
|
+
<tr valign="top" align="left">
|
289
|
+
<td width="11%"></td>
|
290
|
+
<td width="3%">
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
<p style="margin-top: 1em" valign="top"><b>−t</b></p> </td>
|
295
|
+
<td width="8%"></td>
|
296
|
+
<td width="78%">
|
297
|
+
|
298
|
+
|
299
|
+
<p style="margin-top: 1em" valign="top">Use
|
300
|
+
<b>/usr/bin/groff -Tps -mandoc -c</b> to format the manual
|
301
|
+
page, passing the output to <b>stdout.</b> The default
|
302
|
+
output format of <b>/usr/bin/groff -Tps -mandoc -c</b> is
|
303
|
+
Postscript, refer to the manual page of <b>/usr/bin/groff
|
304
|
+
-Tps -mandoc -c</b> for ways to pick an alternate
|
305
|
+
format.</p> </td>
|
306
|
+
</table>
|
307
|
+
|
308
|
+
<p style="margin-left:11%; margin-top: 1em">Depending on
|
309
|
+
the selected format and the availability of printing
|
310
|
+
devices, the output may need to be passed through some
|
311
|
+
filter or another before being printed. <b><br>
|
312
|
+
−w</b> or <b>−−path</b></p>
|
313
|
+
|
314
|
+
<p style="margin-left:22%;">Don’t actually display
|
315
|
+
the man pages, but do print the location(s) of the files
|
316
|
+
that would be formatted or displayed. If no argument is
|
317
|
+
given: display (on stdout) the list of directories that is
|
318
|
+
searched by <b>man</b> for man pages. If <b>manpath</b> is a
|
319
|
+
link to man, then "manpath" is equivalent to
|
320
|
+
"man --path".</p>
|
321
|
+
|
322
|
+
<table width="100%" border=0 rules="none" frame="void"
|
323
|
+
cellspacing="0" cellpadding="0">
|
324
|
+
<tr valign="top" align="left">
|
325
|
+
<td width="11%"></td>
|
326
|
+
<td width="3%">
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
<p style="margin-top: 1em" valign="top"><b>−W</b></p> </td>
|
331
|
+
<td width="8%"></td>
|
332
|
+
<td width="78%">
|
333
|
+
|
334
|
+
|
335
|
+
<p style="margin-top: 1em" valign="top">Like −w, but
|
336
|
+
print file names one per line, without additional
|
337
|
+
information. This is useful in shell commands like <b>man
|
338
|
+
-aW man | xargs ls -l</b></p></td>
|
339
|
+
</table>
|
340
|
+
|
341
|
+
<a name="CAT PAGES"></a>
|
342
|
+
<h2>CAT PAGES</h2>
|
343
|
+
|
344
|
+
|
345
|
+
<p style="margin-left:11%; margin-top: 1em">Man will try to
|
346
|
+
save the formatted man pages, in order to save formatting
|
347
|
+
time the next time these pages are needed. Traditionally,
|
348
|
+
formatted versions of pages in DIR/manX are saved in
|
349
|
+
DIR/catX, but other mappings from man dir to cat dir can be
|
350
|
+
specified in <b>/private/etc/man.conf</b>. No cat pages are
|
351
|
+
saved when the required cat directory does not exist. No cat
|
352
|
+
pages are saved when they are formatted for a line length
|
353
|
+
different from 80. No cat pages are saved when man.conf
|
354
|
+
contains the line NOCACHE.</p>
|
355
|
+
|
356
|
+
<p style="margin-left:11%; margin-top: 1em">It is possible
|
357
|
+
to make <b>man</b> suid to a user man. Then, if a cat
|
358
|
+
directory has owner man and mode 0755 (only writable by
|
359
|
+
man), and the cat files have owner man and mode 0644 or 0444
|
360
|
+
(only writable by man, or not writable at all), no ordinary
|
361
|
+
user can change the cat pages or put other files in the cat
|
362
|
+
directory. If <b>man</b> is not made suid, then a cat
|
363
|
+
directory should have mode 0777 if all users should be able
|
364
|
+
to leave cat pages there.</p>
|
365
|
+
|
366
|
+
<p style="margin-left:11%; margin-top: 1em">The option
|
367
|
+
<b>−c</b> forces reformatting a page, even if a recent
|
368
|
+
cat page exists.</p>
|
369
|
+
|
370
|
+
<a name="HTML PAGES"></a>
|
371
|
+
<h2>HTML PAGES</h2>
|
372
|
+
|
373
|
+
|
374
|
+
<p style="margin-left:11%; margin-top: 1em">Man will find
|
375
|
+
HTML pages if they live in directories named as expected to
|
376
|
+
be ".html", thus a valid name for an HTML version
|
377
|
+
of the <b>ls</b>(1) man page would be
|
378
|
+
<i>/usr/share/man/htmlman1/ls.1.html</i>.</p>
|
379
|
+
|
380
|
+
<a name="SEARCH PATH FOR MANUAL PAGES"></a>
|
381
|
+
<h2>SEARCH PATH FOR MANUAL PAGES</h2>
|
382
|
+
|
383
|
+
|
384
|
+
<p style="margin-left:11%; margin-top: 1em"><b>man</b> uses
|
385
|
+
a sophisticated method of finding manual page files, based
|
386
|
+
on the invocation options and environment variables, the
|
387
|
+
<b>/private/etc/man.conf</b> configuration file, and some
|
388
|
+
built in conventions and heuristics.</p>
|
389
|
+
|
390
|
+
<p style="margin-left:11%; margin-top: 1em">First of all,
|
391
|
+
when the <i>name</i> argument to <b>man</b> contains a slash
|
392
|
+
(<b>/</b>), <b>man</b> assumes it is a file specification
|
393
|
+
itself, and there is no searching involved.</p>
|
394
|
+
|
395
|
+
<p style="margin-left:11%; margin-top: 1em">But in the
|
396
|
+
normal case where <i>name</i> doesn’t contain a slash,
|
397
|
+
<b>man</b> searches a variety of directories for a file that
|
398
|
+
could be a manual page for the topic named.</p>
|
399
|
+
|
400
|
+
<p style="margin-left:11%; margin-top: 1em">If you specify
|
401
|
+
the <b>-M</b> <i>pathlist</i> option, <i>pathlist</i> is a
|
402
|
+
colon-separated list of the directories that <b>man</b>
|
403
|
+
searches.</p>
|
404
|
+
|
405
|
+
<p style="margin-left:11%; margin-top: 1em">If you
|
406
|
+
don’t specify <b>-M</b> but set the <b>MANPATH</b>
|
407
|
+
environment variable, the value of that variable is the list
|
408
|
+
of the directories that <b>man</b> searches.</p>
|
409
|
+
|
410
|
+
<p style="margin-left:11%; margin-top: 1em">If you
|
411
|
+
don’t specify an explicit path list with <b>-M</b> or
|
412
|
+
<b>MANPATH</b>, <b>man</b> develops its own path list based
|
413
|
+
on the contents of the configuration file
|
414
|
+
<b>/private/etc/man.conf</b>. The <b>MANPATH</b> statements
|
415
|
+
in the configuration file identify particular directories to
|
416
|
+
include in the search path.</p>
|
417
|
+
|
418
|
+
<p style="margin-left:11%; margin-top: 1em">Furthermore,
|
419
|
+
the <b>MANPATH_MAP</b> statements add to the search path
|
420
|
+
depending on your command search path (i.e. your <b>PATH</b>
|
421
|
+
environment variable). For each directory that may be in the
|
422
|
+
command search path, a <b>MANPATH_MAP</b> statement
|
423
|
+
specifies a directory that should be added to the search
|
424
|
+
path for manual page files. <b>man</b> looks at the
|
425
|
+
<b>PATH</b> variable and adds the corresponding directories
|
426
|
+
to the manual page file search path. Thus, with the proper
|
427
|
+
use of <b>MANPATH_MAP</b>, when you issue the command <b>man
|
428
|
+
xyz</b>, you get a manual page for the program that would
|
429
|
+
run if you issued the command <b>xyz</b>.</p>
|
430
|
+
|
431
|
+
<p style="margin-left:11%; margin-top: 1em">In addition,
|
432
|
+
for each directory in the command search path (we’ll
|
433
|
+
call it a "command directory") for which you do
|
434
|
+
<i>not</i> have a <b>MANPATH_MAP</b> statement, <b>man</b>
|
435
|
+
automatically looks for a manual page directory
|
436
|
+
"nearby" namely as a subdirectory in the command
|
437
|
+
directory itself or in the parent directory of the command
|
438
|
+
directory.</p>
|
439
|
+
|
440
|
+
<p style="margin-left:11%; margin-top: 1em">You can disable
|
441
|
+
the automatic "nearby" searches by including a
|
442
|
+
<b>NOAUTOPATH</b> statement in
|
443
|
+
<b>/private/etc/man.conf</b>.</p>
|
444
|
+
|
445
|
+
<p style="margin-left:11%; margin-top: 1em">In each
|
446
|
+
directory in the search path as described above, <b>man</b>
|
447
|
+
searches for a file named
|
448
|
+
<i>topic</i><b>.</b><i>section</i>, with an optional suffix
|
449
|
+
on the section number and possibly a compression suffix. If
|
450
|
+
it doesn’t find such a file, it then looks in any
|
451
|
+
subdirectories named <b>man</b><i>N</i> or
|
452
|
+
<b>cat</b><i>N</i> where <i>N</i> is the manual section
|
453
|
+
number. If the file is in a <b>cat</b><i>N</i> subdirectory,
|
454
|
+
<b>man</b> assumes it is a formatted manual page file (cat
|
455
|
+
page). Otherwise, <b>man</b> assumes it is unformatted. In
|
456
|
+
either case, if the filename has a known compression suffix
|
457
|
+
(like <b>.gz</b>), <b>man</b> assumes it is gzipped.</p>
|
458
|
+
|
459
|
+
<p style="margin-left:11%; margin-top: 1em">If you want to
|
460
|
+
see where (or if) <b>man</b> would find the manual page for
|
461
|
+
a particular topic, use the <b>--path</b> (<b>-w</b>)
|
462
|
+
option.</p>
|
463
|
+
|
464
|
+
<a name="ENVIRONMENT"></a>
|
465
|
+
<h2>ENVIRONMENT</h2>
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
<p style="margin-left:11%; margin-top: 1em"><b>MANPATH</b></p>
|
470
|
+
|
471
|
+
<p style="margin-left:22%;">If <b>MANPATH</b> is set,
|
472
|
+
<b>man</b> uses it as the path to search for manual page
|
473
|
+
files. It overrides the configuration file and the automatic
|
474
|
+
search path, but is overridden by the <b>-M</b> invocation
|
475
|
+
option. See <b>SEARCH PATH FOR MANUAL PAGES</b>.</p>
|
476
|
+
|
477
|
+
<table width="100%" border=0 rules="none" frame="void"
|
478
|
+
cellspacing="0" cellpadding="0">
|
479
|
+
<tr valign="top" align="left">
|
480
|
+
<td width="11%"></td>
|
481
|
+
<td width="7%">
|
482
|
+
|
483
|
+
|
484
|
+
<p style="margin-top: 1em" valign="top"><b>MANPL</b></p></td>
|
485
|
+
<td width="4%"></td>
|
486
|
+
<td width="78%">
|
487
|
+
|
488
|
+
|
489
|
+
<p style="margin-top: 1em" valign="top">If <b>MANPL</b> is
|
490
|
+
set, its value is used as the display page length.
|
491
|
+
Otherwise, the entire man page will occupy one (long)
|
492
|
+
page.</p> </td>
|
493
|
+
</table>
|
494
|
+
|
495
|
+
<p style="margin-left:11%;"><b>MANROFFSEQ</b></p>
|
496
|
+
|
497
|
+
<p style="margin-left:22%;">If <b>MANROFFSEQ</b> is set,
|
498
|
+
its value is used to determine the set of preprocessors run
|
499
|
+
before running <b>nroff</b> or <b>troff</b>. By default,
|
500
|
+
pages are passed through the tbl preprocessor before
|
501
|
+
<b>nroff</b>.</p>
|
502
|
+
|
503
|
+
<p style="margin-left:11%;"><b>MANSECT</b></p>
|
504
|
+
|
505
|
+
<p style="margin-left:22%;">If <b>MANSECT</b> is set, its
|
506
|
+
value is used to determine which manual sections to
|
507
|
+
search.</p>
|
508
|
+
|
509
|
+
<p style="margin-left:11%;"><b>MANWIDTH</b></p>
|
510
|
+
|
511
|
+
<p style="margin-left:22%;">If <b>MANWIDTH</b> is set, its
|
512
|
+
value is used as the width manpages should be displayed.
|
513
|
+
Otherwise the pages may be displayed over the whole width of
|
514
|
+
your screen.</p>
|
515
|
+
|
516
|
+
<p style="margin-left:11%;"><b>MANPAGER</b></p>
|
517
|
+
|
518
|
+
<p style="margin-left:22%;">If <b>MANPAGER</b> is set, its
|
519
|
+
value is used as the name of the program to use to display
|
520
|
+
the man page. If not, then <b>PAGER</b> is used. If that has
|
521
|
+
no value either, <b>/usr/bin/less -is</b> is used.</p>
|
522
|
+
|
523
|
+
<p style="margin-left:11%;"><b>BROWSER</b></p>
|
524
|
+
|
525
|
+
<p style="margin-left:22%;">The name of a browser to use
|
526
|
+
for displaying HTML manual pages. If it is not set,
|
527
|
+
/usr/bin/less -is is used.</p>
|
528
|
+
|
529
|
+
<p style="margin-left:11%;"><b>HTMLPAGER</b></p>
|
530
|
+
|
531
|
+
<p style="margin-left:22%;">The command to use for
|
532
|
+
rendering HTML manual pages as text. If it is not set,
|
533
|
+
/bin/cat is used.</p>
|
534
|
+
|
535
|
+
<table width="100%" border=0 rules="none" frame="void"
|
536
|
+
cellspacing="0" cellpadding="0">
|
537
|
+
<tr valign="top" align="left">
|
538
|
+
<td width="11%"></td>
|
539
|
+
<td width="6%">
|
540
|
+
|
541
|
+
|
542
|
+
<p style="margin-top: 1em" valign="top"><b>LANG</b></p></td>
|
543
|
+
<td width="5%"></td>
|
544
|
+
<td width="78%">
|
545
|
+
|
546
|
+
|
547
|
+
<p style="margin-top: 1em" valign="top">If <b>LANG</b> is
|
548
|
+
set, its value defines the name of the subdirectory where
|
549
|
+
man first looks for man pages. Thus, the command
|
550
|
+
‘LANG=dk man 1 foo’ will cause man to look for
|
551
|
+
the foo man page in .../dk/man1/foo.1, and if it cannot find
|
552
|
+
such a file, then in .../man1/foo.1, where ... is a
|
553
|
+
directory on the search path.</p></td>
|
554
|
+
</table>
|
555
|
+
|
556
|
+
<p style="margin-left:11%;"><b>NLSPATH, LC_MESSAGES,
|
557
|
+
LANG</b></p>
|
558
|
+
|
559
|
+
<p style="margin-left:22%;">The environment variables
|
560
|
+
<b>NLSPATH</b> and <b>LC_MESSAGES</b> (or <b>LANG</b> when
|
561
|
+
the latter does not exist) play a role in locating the
|
562
|
+
message catalog. (But the English messages are compiled in,
|
563
|
+
and for English no catalog is required.) Note that programs
|
564
|
+
like <b>col(1)</b> called by man also use e.g. LC_CTYPE.</p>
|
565
|
+
|
566
|
+
<table width="100%" border=0 rules="none" frame="void"
|
567
|
+
cellspacing="0" cellpadding="0">
|
568
|
+
<tr valign="top" align="left">
|
569
|
+
<td width="11%"></td>
|
570
|
+
<td width="9%">
|
571
|
+
|
572
|
+
|
573
|
+
<p style="margin-top: 1em" valign="top"><b>PATH</b></p></td>
|
574
|
+
<td width="2%"></td>
|
575
|
+
<td width="78%">
|
576
|
+
|
577
|
+
|
578
|
+
<p style="margin-top: 1em" valign="top"><b>PATH</b> helps
|
579
|
+
determine the search path for manual page files. See
|
580
|
+
<b>SEARCH PATH FOR MANUAL PAGES</b>.</p></td>
|
581
|
+
<tr valign="top" align="left">
|
582
|
+
<td width="11%"></td>
|
583
|
+
<td width="9%">
|
584
|
+
|
585
|
+
|
586
|
+
<p style="margin-top: 1em" valign="top"><b>SYSTEM</b></p></td>
|
587
|
+
<td width="2%"></td>
|
588
|
+
<td width="78%">
|
589
|
+
|
590
|
+
|
591
|
+
<p style="margin-top: 1em" valign="top"><b>SYSTEM</b> is
|
592
|
+
used to get the default alternate system name (for use with
|
593
|
+
the <b>−m</b> option).</p></td>
|
594
|
+
</table>
|
595
|
+
|
596
|
+
<a name="BUGS"></a>
|
597
|
+
<h2>BUGS</h2>
|
598
|
+
|
599
|
+
|
600
|
+
<p style="margin-left:11%; margin-top: 1em">The
|
601
|
+
<b>−t</b> option only works if a troff-like program is
|
602
|
+
installed. <br>
|
603
|
+
If you see blinking \255 or <AD> instead of hyphens,
|
604
|
+
put ‘LESSCHARSET=latin1’ in your
|
605
|
+
environment.</p>
|
606
|
+
|
607
|
+
<a name="TIPS"></a>
|
608
|
+
<h2>TIPS</h2>
|
609
|
+
|
610
|
+
|
611
|
+
<p style="margin-left:11%; margin-top: 1em">If you add the
|
612
|
+
line</p>
|
613
|
+
|
614
|
+
|
615
|
+
<p style="margin-left:11%; margin-top: 1em">(global-set-key
|
616
|
+
[(f1)] (lambda () (interactive) (manual-entry
|
617
|
+
(current-word))))</p>
|
618
|
+
|
619
|
+
<p style="margin-left:11%; margin-top: 1em">to your
|
620
|
+
<i>.emacs</i> file, then hitting F1 will give you the man
|
621
|
+
page for the library call at the current cursor
|
622
|
+
position.</p>
|
623
|
+
|
624
|
+
<p style="margin-left:11%; margin-top: 1em">To get a plain
|
625
|
+
text version of a man page, without backspaces and
|
626
|
+
underscores, try</p>
|
627
|
+
|
628
|
+
<p style="margin-left:11%; margin-top: 1em"># man foo | col
|
629
|
+
-b > foo.mantxt</p>
|
630
|
+
|
631
|
+
<a name="AUTHOR"></a>
|
632
|
+
<h2>AUTHOR</h2>
|
633
|
+
|
634
|
+
|
635
|
+
<p style="margin-left:11%; margin-top: 1em">John W. Eaton
|
636
|
+
was the original author of <b>man</b>. Zeyd M. Ben-Halim
|
637
|
+
released man 1.2, and Andries Brouwer followed up with
|
638
|
+
versions 1.3 thru 1.5p. Federico Lucifredi
|
639
|
+
<flucifredi@acm.org> is the current maintainer.</p>
|
640
|
+
|
641
|
+
<a name="SEE ALSO"></a>
|
642
|
+
<h2>SEE ALSO</h2>
|
643
|
+
|
644
|
+
|
645
|
+
<p style="margin-left:11%; margin-top: 1em">apropos(1),
|
646
|
+
whatis(1), less(1), groff(1), man.conf(5).</p>
|
647
|
+
<hr>
|
648
|
+
</body>
|
649
|
+
</html>
|