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,3554 @@
|
|
1
|
+
<!-- Creator : groff version 1.19.2 -->
|
2
|
+
<!-- CreationDate: Tue Nov 29 21:01:37 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>LESS</title>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
|
20
|
+
<h1 align=center>LESS</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="#COMMANDS">COMMANDS</a><br>
|
26
|
+
<a href="#OPTIONS">OPTIONS</a><br>
|
27
|
+
<a href="#LINE EDITING">LINE EDITING</a><br>
|
28
|
+
<a href="#KEY BINDINGS">KEY BINDINGS</a><br>
|
29
|
+
<a href="#INPUT PREPROCESSOR">INPUT PREPROCESSOR</a><br>
|
30
|
+
<a href="#NATIONAL CHARACTER SETS">NATIONAL CHARACTER SETS</a><br>
|
31
|
+
<a href="#PROMPTS">PROMPTS</a><br>
|
32
|
+
<a href="#SECURITY">SECURITY</a><br>
|
33
|
+
<a href="#COMPATIBILITY WITH MORE">COMPATIBILITY WITH MORE</a><br>
|
34
|
+
<a href="#ENVIRONMENT VARIABLES">ENVIRONMENT VARIABLES</a><br>
|
35
|
+
<a href="#SEE ALSO">SEE ALSO</a><br>
|
36
|
+
<a href="#COPYRIGHT">COPYRIGHT</a><br>
|
37
|
+
<a href="#AUTHOR">AUTHOR</a><br>
|
38
|
+
|
39
|
+
<hr>
|
40
|
+
|
41
|
+
|
42
|
+
<a name="NAME"></a>
|
43
|
+
<h2>NAME</h2>
|
44
|
+
|
45
|
+
|
46
|
+
<p style="margin-left:11%; margin-top: 1em">less −
|
47
|
+
opposite of more</p>
|
48
|
+
|
49
|
+
<a name="SYNOPSIS"></a>
|
50
|
+
<h2>SYNOPSIS</h2>
|
51
|
+
|
52
|
+
|
53
|
+
<p style="margin-left:11%; margin-top: 1em"><b>less
|
54
|
+
−? <br>
|
55
|
+
less −−help <br>
|
56
|
+
less −V <br>
|
57
|
+
less −−version <br>
|
58
|
+
less [−[+]aBcCdeEfFgGiIJKLmMnNqQrRsSuUVwWX~] <br>
|
59
|
+
[−b</b> <i>space</i><b>] [−h</b>
|
60
|
+
<i>lines</i><b>] [−j</b> <i>line</i><b>] [−k</b>
|
61
|
+
<i>keyfile</i><b>] <br>
|
62
|
+
[−{oO}</b> <i>logfile</i><b>] [−p</b>
|
63
|
+
<i>pattern</i><b>] [−P</b> <i>prompt</i><b>]
|
64
|
+
[−t</b> <i>tag</i><b>] <br>
|
65
|
+
[−T</b> <i>tagsfile</i><b>] [−x</b>
|
66
|
+
<i>tab</i><b>,...] [−y</b> <i>lines</i><b>]
|
67
|
+
[−[z]</b> <i>lines</i><b>] <br>
|
68
|
+
[−#</b> <i>shift</i><b>] [+[+]</b><i>cmd</i><b>]
|
69
|
+
[−−] [</b><i>filename</i><b>]...</b> <br>
|
70
|
+
(See the OPTIONS section for alternate option syntax with
|
71
|
+
long option names.)</p>
|
72
|
+
|
73
|
+
<a name="DESCRIPTION"></a>
|
74
|
+
<h2>DESCRIPTION</h2>
|
75
|
+
|
76
|
+
|
77
|
+
<p style="margin-left:11%; margin-top: 1em"><i>Less</i> is
|
78
|
+
a program similar to <i>more</i> (1), but which allows
|
79
|
+
backward movement in the file as well as forward movement.
|
80
|
+
Also, <i>less</i> does not have to read the entire input
|
81
|
+
file before starting, so with large input files it starts up
|
82
|
+
faster than text editors like <i>vi</i> (1). <i>Less</i>
|
83
|
+
uses termcap (or terminfo on some systems), so it can run on
|
84
|
+
a variety of terminals. There is even limited support for
|
85
|
+
hardcopy terminals. (On a hardcopy terminal, lines which
|
86
|
+
should be printed at the top of the screen are prefixed with
|
87
|
+
a caret.)</p>
|
88
|
+
|
89
|
+
<p style="margin-left:11%; margin-top: 1em">Commands are
|
90
|
+
based on both <i>more</i> and <i>vi.</i> Commands may be
|
91
|
+
preceded by a decimal number, called N in the descriptions
|
92
|
+
below. The number is used by some commands, as
|
93
|
+
indicated.</p>
|
94
|
+
|
95
|
+
<a name="COMMANDS"></a>
|
96
|
+
<h2>COMMANDS</h2>
|
97
|
+
|
98
|
+
|
99
|
+
<p style="margin-left:11%; margin-top: 1em">In the
|
100
|
+
following descriptions, ^X means control-X. ESC stands for
|
101
|
+
the ESCAPE key; for example ESC-v means the two character
|
102
|
+
sequence "ESCAPE", then "v".</p>
|
103
|
+
|
104
|
+
<table width="100%" border=0 rules="none" frame="void"
|
105
|
+
cellspacing="0" cellpadding="0">
|
106
|
+
<tr valign="top" align="left">
|
107
|
+
<td width="11%"></td>
|
108
|
+
<td width="9%">
|
109
|
+
|
110
|
+
|
111
|
+
<p style="margin-top: 1em" valign="top">h or H</p></td>
|
112
|
+
<td width="2%"></td>
|
113
|
+
<td width="78%">
|
114
|
+
|
115
|
+
|
116
|
+
<p style="margin-top: 1em" valign="top">Help: display a
|
117
|
+
summary of these commands. If you forget all the other
|
118
|
+
commands, remember this one.</p></td>
|
119
|
+
</table>
|
120
|
+
|
121
|
+
<p style="margin-left:11%;">SPACE or ^V or f or ^F</p>
|
122
|
+
|
123
|
+
<p style="margin-left:22%;">Scroll forward N lines, default
|
124
|
+
one window (see option −z below). If N is more than
|
125
|
+
the screen size, only the final screenful is displayed.
|
126
|
+
Warning: some systems use ^V as a special literalization
|
127
|
+
character.</p>
|
128
|
+
|
129
|
+
<table width="100%" border=0 rules="none" frame="void"
|
130
|
+
cellspacing="0" cellpadding="0">
|
131
|
+
<tr valign="top" align="left">
|
132
|
+
<td width="11%"></td>
|
133
|
+
<td width="1%">
|
134
|
+
|
135
|
+
|
136
|
+
<p style="margin-top: 1em" valign="top">z</p></td>
|
137
|
+
<td width="10%"></td>
|
138
|
+
<td width="78%">
|
139
|
+
|
140
|
+
|
141
|
+
<p style="margin-top: 1em" valign="top">Like SPACE, but if
|
142
|
+
N is specified, it becomes the new window size.</p></td>
|
143
|
+
</table>
|
144
|
+
|
145
|
+
<p style="margin-left:11%;">ESC-SPACE</p>
|
146
|
+
|
147
|
+
<p style="margin-left:22%;">Like SPACE, but scrolls a full
|
148
|
+
screenful, even if it reaches end-of-file in the
|
149
|
+
process.</p>
|
150
|
+
|
151
|
+
<p style="margin-left:11%;">RETURN or ^N or e or ^E or j or
|
152
|
+
^J</p>
|
153
|
+
|
154
|
+
<p style="margin-left:22%;">Scroll forward N lines, default
|
155
|
+
1. The entire N lines are displayed, even if N is more than
|
156
|
+
the screen size.</p>
|
157
|
+
|
158
|
+
<p style="margin-left:11%;">d or ^D</p>
|
159
|
+
|
160
|
+
<p style="margin-left:22%;">Scroll forward N lines, default
|
161
|
+
one half of the screen size. If N is specified, it becomes
|
162
|
+
the new default for subsequent d and u commands.</p>
|
163
|
+
|
164
|
+
<p style="margin-left:11%;">b or ^B or ESC-v</p>
|
165
|
+
|
166
|
+
<p style="margin-left:22%;">Scroll backward N lines,
|
167
|
+
default one window (see option −z below). If N is more
|
168
|
+
than the screen size, only the final screenful is
|
169
|
+
displayed.</p>
|
170
|
+
|
171
|
+
<table width="100%" border=0 rules="none" frame="void"
|
172
|
+
cellspacing="0" cellpadding="0">
|
173
|
+
<tr valign="top" align="left">
|
174
|
+
<td width="11%"></td>
|
175
|
+
<td width="1%">
|
176
|
+
|
177
|
+
|
178
|
+
<p style="margin-top: 1em" valign="top">w</p></td>
|
179
|
+
<td width="10%"></td>
|
180
|
+
<td width="78%">
|
181
|
+
|
182
|
+
|
183
|
+
<p style="margin-top: 1em" valign="top">Like ESC-v, but if
|
184
|
+
N is specified, it becomes the new window size.</p></td>
|
185
|
+
</table>
|
186
|
+
|
187
|
+
<p style="margin-left:11%;">y or ^Y or ^P or k or ^K</p>
|
188
|
+
|
189
|
+
<p style="margin-left:22%;">Scroll backward N lines,
|
190
|
+
default 1. The entire N lines are displayed, even if N is
|
191
|
+
more than the screen size. Warning: some systems use ^Y as a
|
192
|
+
special job control character.</p>
|
193
|
+
|
194
|
+
<p style="margin-left:11%;">u or ^U</p>
|
195
|
+
|
196
|
+
<p style="margin-left:22%;">Scroll backward N lines,
|
197
|
+
default one half of the screen size. If N is specified, it
|
198
|
+
becomes the new default for subsequent d and u commands.</p>
|
199
|
+
|
200
|
+
<p style="margin-left:11%;">ESC-) or RIGHTARROW</p>
|
201
|
+
|
202
|
+
<p style="margin-left:22%;">Scroll horizontally right N
|
203
|
+
characters, default half the screen width (see the −#
|
204
|
+
option). If a number N is specified, it becomes the default
|
205
|
+
for future RIGHTARROW and LEFTARROW commands. While the text
|
206
|
+
is scrolled, it acts as though the −S option (chop
|
207
|
+
lines) were in effect.</p>
|
208
|
+
|
209
|
+
<p style="margin-left:11%;">ESC-( or LEFTARROW</p>
|
210
|
+
|
211
|
+
<p style="margin-left:22%;">Scroll horizontally left N
|
212
|
+
characters, default half the screen width (see the −#
|
213
|
+
option). If a number N is specified, it becomes the default
|
214
|
+
for future RIGHTARROW and LEFTARROW commands.</p>
|
215
|
+
|
216
|
+
<p style="margin-left:11%;">r or ^R or ^L</p>
|
217
|
+
|
218
|
+
<p style="margin-left:22%;">Repaint the screen.</p>
|
219
|
+
|
220
|
+
<table width="100%" border=0 rules="none" frame="void"
|
221
|
+
cellspacing="0" cellpadding="0">
|
222
|
+
<tr valign="top" align="left">
|
223
|
+
<td width="11%"></td>
|
224
|
+
<td width="1%">
|
225
|
+
|
226
|
+
|
227
|
+
<p style="margin-top: 1em" valign="top">R</p></td>
|
228
|
+
<td width="10%"></td>
|
229
|
+
<td width="78%">
|
230
|
+
|
231
|
+
|
232
|
+
<p style="margin-top: 1em" valign="top">Repaint the screen,
|
233
|
+
discarding any buffered input. Useful if the file is
|
234
|
+
changing while it is being viewed.</p></td>
|
235
|
+
<tr valign="top" align="left">
|
236
|
+
<td width="11%"></td>
|
237
|
+
<td width="1%">
|
238
|
+
|
239
|
+
|
240
|
+
<p style="margin-top: 1em" valign="top">F</p></td>
|
241
|
+
<td width="10%"></td>
|
242
|
+
<td width="78%">
|
243
|
+
|
244
|
+
|
245
|
+
<p style="margin-top: 1em" valign="top">Scroll forward, and
|
246
|
+
keep trying to read when the end of file is reached.
|
247
|
+
Normally this command would be used when already at the end
|
248
|
+
of the file. It is a way to monitor the tail of a file which
|
249
|
+
is growing while it is being viewed. (The behavior is
|
250
|
+
similar to the "tail −f" command.)</p></td>
|
251
|
+
</table>
|
252
|
+
|
253
|
+
<p style="margin-left:11%;">g or < or ESC-<</p>
|
254
|
+
|
255
|
+
<p style="margin-left:22%;">Go to line N in the file,
|
256
|
+
default 1 (beginning of file). (Warning: this may be slow if
|
257
|
+
N is large.)</p>
|
258
|
+
|
259
|
+
<p style="margin-left:11%;">G or > or ESC-></p>
|
260
|
+
|
261
|
+
<p style="margin-left:22%;">Go to line N in the file,
|
262
|
+
default the end of the file. (Warning: this may be slow if N
|
263
|
+
is large, or if N is not specified and standard input,
|
264
|
+
rather than a file, is being read.)</p>
|
265
|
+
|
266
|
+
<table width="100%" border=0 rules="none" frame="void"
|
267
|
+
cellspacing="0" cellpadding="0">
|
268
|
+
<tr valign="top" align="left">
|
269
|
+
<td width="11%"></td>
|
270
|
+
<td width="9%">
|
271
|
+
|
272
|
+
|
273
|
+
<p style="margin-top: 1em" valign="top">p or %</p></td>
|
274
|
+
<td width="2%"></td>
|
275
|
+
<td width="78%">
|
276
|
+
|
277
|
+
|
278
|
+
<p style="margin-top: 1em" valign="top">Go to a position N
|
279
|
+
percent into the file. N should be between 0 and 100, and
|
280
|
+
may contain a decimal point.</p></td>
|
281
|
+
<tr valign="top" align="left">
|
282
|
+
<td width="11%"></td>
|
283
|
+
<td width="9%">
|
284
|
+
|
285
|
+
|
286
|
+
<p style="margin-top: 1em" valign="top">P</p></td>
|
287
|
+
<td width="2%"></td>
|
288
|
+
<td width="78%">
|
289
|
+
|
290
|
+
|
291
|
+
<p style="margin-top: 1em" valign="top">Go to the line
|
292
|
+
containing byte offset N in the file.</p></td>
|
293
|
+
<tr valign="top" align="left">
|
294
|
+
<td width="11%"></td>
|
295
|
+
<td width="9%">
|
296
|
+
|
297
|
+
|
298
|
+
<p style="margin-top: 1em" valign="top">{</p></td>
|
299
|
+
<td width="2%"></td>
|
300
|
+
<td width="78%">
|
301
|
+
|
302
|
+
|
303
|
+
<p style="margin-top: 1em" valign="top">If a left curly
|
304
|
+
bracket appears in the top line displayed on the screen, the
|
305
|
+
{ command will go to the matching right curly bracket. The
|
306
|
+
matching right curly bracket is positioned on the bottom
|
307
|
+
line of the screen. If there is more than one left curly
|
308
|
+
bracket on the top line, a number N may be used to specify
|
309
|
+
the N-th bracket on the line.</p></td>
|
310
|
+
<tr valign="top" align="left">
|
311
|
+
<td width="11%"></td>
|
312
|
+
<td width="9%">
|
313
|
+
|
314
|
+
|
315
|
+
<p style="margin-top: 1em" valign="top">}</p></td>
|
316
|
+
<td width="2%"></td>
|
317
|
+
<td width="78%">
|
318
|
+
|
319
|
+
|
320
|
+
<p style="margin-top: 1em" valign="top">If a right curly
|
321
|
+
bracket appears in the bottom line displayed on the screen,
|
322
|
+
the } command will go to the matching left curly bracket.
|
323
|
+
The matching left curly bracket is positioned on the top
|
324
|
+
line of the screen. If there is more than one right curly
|
325
|
+
bracket on the top line, a number N may be used to specify
|
326
|
+
the N-th bracket on the line.</p></td>
|
327
|
+
<tr valign="top" align="left">
|
328
|
+
<td width="11%"></td>
|
329
|
+
<td width="9%">
|
330
|
+
|
331
|
+
|
332
|
+
<p style="margin-top: 1em" valign="top">(</p></td>
|
333
|
+
<td width="2%"></td>
|
334
|
+
<td width="78%">
|
335
|
+
|
336
|
+
|
337
|
+
<p style="margin-top: 1em" valign="top">Like {, but applies
|
338
|
+
to parentheses rather than curly brackets.</p></td>
|
339
|
+
<tr valign="top" align="left">
|
340
|
+
<td width="11%"></td>
|
341
|
+
<td width="9%">
|
342
|
+
|
343
|
+
|
344
|
+
<p style="margin-top: 1em" valign="top">)</p></td>
|
345
|
+
<td width="2%"></td>
|
346
|
+
<td width="78%">
|
347
|
+
|
348
|
+
|
349
|
+
<p style="margin-top: 1em" valign="top">Like }, but applies
|
350
|
+
to parentheses rather than curly brackets.</p></td>
|
351
|
+
<tr valign="top" align="left">
|
352
|
+
<td width="11%"></td>
|
353
|
+
<td width="9%">
|
354
|
+
|
355
|
+
|
356
|
+
<p style="margin-top: 1em" valign="top">[</p></td>
|
357
|
+
<td width="2%"></td>
|
358
|
+
<td width="78%">
|
359
|
+
|
360
|
+
|
361
|
+
<p style="margin-top: 1em" valign="top">Like {, but applies
|
362
|
+
to square brackets rather than curly brackets.</p></td>
|
363
|
+
<tr valign="top" align="left">
|
364
|
+
<td width="11%"></td>
|
365
|
+
<td width="9%">
|
366
|
+
|
367
|
+
|
368
|
+
<p style="margin-top: 1em" valign="top">]</p></td>
|
369
|
+
<td width="2%"></td>
|
370
|
+
<td width="78%">
|
371
|
+
|
372
|
+
|
373
|
+
<p style="margin-top: 1em" valign="top">Like }, but applies
|
374
|
+
to square brackets rather than curly brackets.</p></td>
|
375
|
+
<tr valign="top" align="left">
|
376
|
+
<td width="11%"></td>
|
377
|
+
<td width="9%">
|
378
|
+
|
379
|
+
|
380
|
+
<p style="margin-top: 1em" valign="top">ESC-^F</p></td>
|
381
|
+
<td width="2%"></td>
|
382
|
+
<td width="78%">
|
383
|
+
|
384
|
+
|
385
|
+
<p style="margin-top: 1em" valign="top">Followed by two
|
386
|
+
characters, acts like {, but uses the two characters as open
|
387
|
+
and close brackets, respectively. For example, "ESC ^F
|
388
|
+
< >" could be used to go forward to the >
|
389
|
+
which matches the < in the top displayed line.</p></td>
|
390
|
+
<tr valign="top" align="left">
|
391
|
+
<td width="11%"></td>
|
392
|
+
<td width="9%">
|
393
|
+
|
394
|
+
|
395
|
+
<p style="margin-top: 1em" valign="top">ESC-^B</p></td>
|
396
|
+
<td width="2%"></td>
|
397
|
+
<td width="78%">
|
398
|
+
|
399
|
+
|
400
|
+
<p style="margin-top: 1em" valign="top">Followed by two
|
401
|
+
characters, acts like }, but uses the two characters as open
|
402
|
+
and close brackets, respectively. For example, "ESC ^B
|
403
|
+
< >" could be used to go backward to the <
|
404
|
+
which matches the > in the bottom displayed line.</p></td>
|
405
|
+
<tr valign="top" align="left">
|
406
|
+
<td width="11%"></td>
|
407
|
+
<td width="9%">
|
408
|
+
|
409
|
+
|
410
|
+
<p style="margin-top: 1em" valign="top">m</p></td>
|
411
|
+
<td width="2%"></td>
|
412
|
+
<td width="78%">
|
413
|
+
|
414
|
+
|
415
|
+
<p style="margin-top: 1em" valign="top">Followed by any
|
416
|
+
lowercase letter, marks the current position with that
|
417
|
+
letter.</p> </td>
|
418
|
+
<tr valign="top" align="left">
|
419
|
+
<td width="11%"></td>
|
420
|
+
<td width="9%">
|
421
|
+
|
422
|
+
|
423
|
+
<p style="margin-top: 1em" valign="top">’</p></td>
|
424
|
+
<td width="2%"></td>
|
425
|
+
<td width="78%">
|
426
|
+
|
427
|
+
|
428
|
+
<p style="margin-top: 1em" valign="top">(Single quote.)
|
429
|
+
Followed by any lowercase letter, returns to the position
|
430
|
+
which was previously marked with that letter. Followed by
|
431
|
+
another single quote, returns to the position at which the
|
432
|
+
last "large" movement command was executed.
|
433
|
+
Followed by a ^ or $, jumps to the beginning or end of the
|
434
|
+
file respectively. Marks are preserved when a new file is
|
435
|
+
examined, so the ’ command can be used to switch
|
436
|
+
between input files.</p></td>
|
437
|
+
<tr valign="top" align="left">
|
438
|
+
<td width="11%"></td>
|
439
|
+
<td width="9%">
|
440
|
+
|
441
|
+
|
442
|
+
<p style="margin-top: 1em" valign="top">^X^X</p></td>
|
443
|
+
<td width="2%"></td>
|
444
|
+
<td width="78%">
|
445
|
+
|
446
|
+
|
447
|
+
<p style="margin-top: 1em" valign="top">Same as single
|
448
|
+
quote.</p> </td>
|
449
|
+
</table>
|
450
|
+
|
451
|
+
<p style="margin-left:11%;">/pattern</p>
|
452
|
+
|
453
|
+
<p style="margin-left:22%;">Search forward in the file for
|
454
|
+
the N-th line containing the pattern. N defaults to 1. The
|
455
|
+
pattern is a regular expression, as recognized by the
|
456
|
+
regular expression library supplied by your system. The
|
457
|
+
search starts at the second line displayed (but see the
|
458
|
+
−a and −j options, which change this).</p>
|
459
|
+
|
460
|
+
<p style="margin-left:22%; margin-top: 1em">Certain
|
461
|
+
characters are special if entered at the beginning of the
|
462
|
+
pattern; they modify the type of search rather than become
|
463
|
+
part of the pattern: <br>
|
464
|
+
^N or !</p>
|
465
|
+
|
466
|
+
<p style="margin-left:32%;">Search for lines which do NOT
|
467
|
+
match the pattern.</p>
|
468
|
+
|
469
|
+
<p style="margin-left:22%;">^E or *</p>
|
470
|
+
|
471
|
+
<p style="margin-left:32%;">Search multiple files. That is,
|
472
|
+
if the search reaches the END of the current file without
|
473
|
+
finding a match, the search continues in the next file in
|
474
|
+
the command line list.</p>
|
475
|
+
|
476
|
+
<p style="margin-left:22%;">^F or @</p>
|
477
|
+
|
478
|
+
<p style="margin-left:32%;">Begin the search at the first
|
479
|
+
line of the FIRST file in the command line list, regardless
|
480
|
+
of what is currently displayed on the screen or the settings
|
481
|
+
of the −a or −j options.</p>
|
482
|
+
|
483
|
+
<table width="100%" border=0 rules="none" frame="void"
|
484
|
+
cellspacing="0" cellpadding="0">
|
485
|
+
<tr valign="top" align="left">
|
486
|
+
<td width="22%"></td>
|
487
|
+
<td width="3%">
|
488
|
+
|
489
|
+
|
490
|
+
<p style="margin-top: 1em" valign="top">^K</p></td>
|
491
|
+
<td width="7%"></td>
|
492
|
+
<td width="68%">
|
493
|
+
|
494
|
+
|
495
|
+
<p style="margin-top: 1em" valign="top">Highlight any text
|
496
|
+
which matches the pattern on the current screen, but
|
497
|
+
don’t move to the first match (KEEP current
|
498
|
+
position).</p> </td>
|
499
|
+
<tr valign="top" align="left">
|
500
|
+
<td width="22%"></td>
|
501
|
+
<td width="3%">
|
502
|
+
|
503
|
+
|
504
|
+
<p style="margin-top: 1em" valign="top">^R</p></td>
|
505
|
+
<td width="7%"></td>
|
506
|
+
<td width="68%">
|
507
|
+
|
508
|
+
|
509
|
+
<p style="margin-top: 1em" valign="top">Don’t
|
510
|
+
interpret regular expression metacharacters; that is, do a
|
511
|
+
simple textual comparison.</p></td>
|
512
|
+
</table>
|
513
|
+
|
514
|
+
<p style="margin-left:11%;">?pattern</p>
|
515
|
+
|
516
|
+
<p style="margin-left:22%;">Search backward in the file for
|
517
|
+
the N-th line containing the pattern. The search starts at
|
518
|
+
the line immediately before the top line displayed.</p>
|
519
|
+
|
520
|
+
<p style="margin-left:22%; margin-top: 1em">Certain
|
521
|
+
characters are special as in the / command: <br>
|
522
|
+
^N or !</p>
|
523
|
+
|
524
|
+
<p style="margin-left:32%;">Search for lines which do NOT
|
525
|
+
match the pattern.</p>
|
526
|
+
|
527
|
+
<p style="margin-left:22%;">^E or *</p>
|
528
|
+
|
529
|
+
<p style="margin-left:32%;">Search multiple files. That is,
|
530
|
+
if the search reaches the beginning of the current file
|
531
|
+
without finding a match, the search continues in the
|
532
|
+
previous file in the command line list.</p>
|
533
|
+
|
534
|
+
<p style="margin-left:22%;">^F or @</p>
|
535
|
+
|
536
|
+
<p style="margin-left:32%;">Begin the search at the last
|
537
|
+
line of the last file in the command line list, regardless
|
538
|
+
of what is currently displayed on the screen or the settings
|
539
|
+
of the −a or −j options.</p>
|
540
|
+
|
541
|
+
<table width="100%" border=0 rules="none" frame="void"
|
542
|
+
cellspacing="0" cellpadding="0">
|
543
|
+
<tr valign="top" align="left">
|
544
|
+
<td width="22%"></td>
|
545
|
+
<td width="3%">
|
546
|
+
|
547
|
+
|
548
|
+
<p style="margin-top: 1em" valign="top">^K</p></td>
|
549
|
+
<td width="7%"></td>
|
550
|
+
<td width="36%">
|
551
|
+
|
552
|
+
|
553
|
+
<p style="margin-top: 1em" valign="top">As in forward
|
554
|
+
searches.</p> </td>
|
555
|
+
<td width="32%">
|
556
|
+
</td>
|
557
|
+
<tr valign="top" align="left">
|
558
|
+
<td width="22%"></td>
|
559
|
+
<td width="3%">
|
560
|
+
|
561
|
+
|
562
|
+
<p style="margin-top: 1em" valign="top">^R</p></td>
|
563
|
+
<td width="7%"></td>
|
564
|
+
<td width="36%">
|
565
|
+
|
566
|
+
|
567
|
+
<p style="margin-top: 1em" valign="top">As in forward
|
568
|
+
searches.</p> </td>
|
569
|
+
<td width="32%">
|
570
|
+
</td>
|
571
|
+
</table>
|
572
|
+
|
573
|
+
<p style="margin-left:11%;">ESC-/pattern</p>
|
574
|
+
|
575
|
+
<p style="margin-left:22%;">Same as "/*".</p>
|
576
|
+
|
577
|
+
<p style="margin-left:11%;">ESC-?pattern</p>
|
578
|
+
|
579
|
+
<p style="margin-left:22%;">Same as "?*".</p>
|
580
|
+
|
581
|
+
<table width="100%" border=0 rules="none" frame="void"
|
582
|
+
cellspacing="0" cellpadding="0">
|
583
|
+
<tr valign="top" align="left">
|
584
|
+
<td width="11%"></td>
|
585
|
+
<td width="7%">
|
586
|
+
|
587
|
+
|
588
|
+
<p style="margin-top: 1em" valign="top">n</p></td>
|
589
|
+
<td width="4%"></td>
|
590
|
+
<td width="78%">
|
591
|
+
|
592
|
+
|
593
|
+
<p style="margin-top: 1em" valign="top">Repeat previous
|
594
|
+
search, for N-th line containing the last pattern. If the
|
595
|
+
previous search was modified by ^N, the search is made for
|
596
|
+
the N-th line NOT containing the pattern. If the previous
|
597
|
+
search was modified by ^E, the search continues in the next
|
598
|
+
(or previous) file if not satisfied in the current file. If
|
599
|
+
the previous search was modified by ^R, the search is done
|
600
|
+
without using regular expressions. There is no effect if the
|
601
|
+
previous search was modified by ^F or ^K.</p></td>
|
602
|
+
<tr valign="top" align="left">
|
603
|
+
<td width="11%"></td>
|
604
|
+
<td width="7%">
|
605
|
+
|
606
|
+
|
607
|
+
<p style="margin-top: 1em" valign="top">N</p></td>
|
608
|
+
<td width="4%"></td>
|
609
|
+
<td width="78%">
|
610
|
+
|
611
|
+
|
612
|
+
<p style="margin-top: 1em" valign="top">Repeat previous
|
613
|
+
search, but in the reverse direction.</p></td>
|
614
|
+
<tr valign="top" align="left">
|
615
|
+
<td width="11%"></td>
|
616
|
+
<td width="7%">
|
617
|
+
|
618
|
+
|
619
|
+
<p style="margin-top: 1em" valign="top">ESC-n</p></td>
|
620
|
+
<td width="4%"></td>
|
621
|
+
<td width="78%">
|
622
|
+
|
623
|
+
|
624
|
+
<p style="margin-top: 1em" valign="top">Repeat previous
|
625
|
+
search, but crossing file boundaries. The effect is as if
|
626
|
+
the previous search were modified by *.</p></td>
|
627
|
+
<tr valign="top" align="left">
|
628
|
+
<td width="11%"></td>
|
629
|
+
<td width="7%">
|
630
|
+
|
631
|
+
|
632
|
+
<p style="margin-top: 1em" valign="top">ESC-N</p></td>
|
633
|
+
<td width="4%"></td>
|
634
|
+
<td width="78%">
|
635
|
+
|
636
|
+
|
637
|
+
<p style="margin-top: 1em" valign="top">Repeat previous
|
638
|
+
search, but in the reverse direction and crossing file
|
639
|
+
boundaries.</p> </td>
|
640
|
+
<tr valign="top" align="left">
|
641
|
+
<td width="11%"></td>
|
642
|
+
<td width="7%">
|
643
|
+
|
644
|
+
|
645
|
+
<p style="margin-top: 1em" valign="top">ESC-u</p></td>
|
646
|
+
<td width="4%"></td>
|
647
|
+
<td width="78%">
|
648
|
+
|
649
|
+
|
650
|
+
<p style="margin-top: 1em" valign="top">Undo search
|
651
|
+
highlighting. Turn off highlighting of strings matching the
|
652
|
+
current search pattern. If highlighting is already off
|
653
|
+
because of a previous ESC-u command, turn highlighting back
|
654
|
+
on. Any search command will also turn highlighting back on.
|
655
|
+
(Highlighting can also be disabled by toggling the −G
|
656
|
+
option; in that case search commands do not turn
|
657
|
+
highlighting back on.)</p></td>
|
658
|
+
</table>
|
659
|
+
|
660
|
+
<p style="margin-left:11%;">:e [filename]</p>
|
661
|
+
|
662
|
+
<p style="margin-left:22%;">Examine a new file. If the
|
663
|
+
filename is missing, the "current" file (see the
|
664
|
+
:n and :p commands below) from the list of files in the
|
665
|
+
command line is re-examined. A percent sign (%) in the
|
666
|
+
filename is replaced by the name of the current file. A
|
667
|
+
pound sign (#) is replaced by the name of the previously
|
668
|
+
examined file. However, two consecutive percent signs are
|
669
|
+
simply replaced with a single percent sign. This allows you
|
670
|
+
to enter a filename that contains a percent sign in the
|
671
|
+
name. Similarly, two consecutive pound signs are replaced
|
672
|
+
with a single pound sign. The filename is inserted into the
|
673
|
+
command line list of files so that it can be seen by
|
674
|
+
subsequent :n and :p commands. If the filename consists of
|
675
|
+
several files, they are all inserted into the list of files
|
676
|
+
and the first one is examined. If the filename contains one
|
677
|
+
or more spaces, the entire filename should be enclosed in
|
678
|
+
double quotes (also see the −" option).</p>
|
679
|
+
|
680
|
+
<p style="margin-left:11%;">^X^V or E</p>
|
681
|
+
|
682
|
+
<p style="margin-left:22%;">Same as :e. Warning: some
|
683
|
+
systems use ^V as a special literalization character. On
|
684
|
+
such systems, you may not be able to use ^V.</p>
|
685
|
+
|
686
|
+
<table width="100%" border=0 rules="none" frame="void"
|
687
|
+
cellspacing="0" cellpadding="0">
|
688
|
+
<tr valign="top" align="left">
|
689
|
+
<td width="11%"></td>
|
690
|
+
<td width="3%">
|
691
|
+
|
692
|
+
|
693
|
+
<p style="margin-top: 1em" valign="top">:n</p></td>
|
694
|
+
<td width="8%"></td>
|
695
|
+
<td width="78%">
|
696
|
+
|
697
|
+
|
698
|
+
<p style="margin-top: 1em" valign="top">Examine the next
|
699
|
+
file (from the list of files given in the command line). If
|
700
|
+
a number N is specified, the N-th next file is examined.</p></td>
|
701
|
+
<tr valign="top" align="left">
|
702
|
+
<td width="11%"></td>
|
703
|
+
<td width="3%">
|
704
|
+
|
705
|
+
|
706
|
+
<p style="margin-top: 1em" valign="top">:p</p></td>
|
707
|
+
<td width="8%"></td>
|
708
|
+
<td width="78%">
|
709
|
+
|
710
|
+
|
711
|
+
<p style="margin-top: 1em" valign="top">Examine the
|
712
|
+
previous file in the command line list. If a number N is
|
713
|
+
specified, the N-th previous file is examined.</p></td>
|
714
|
+
<tr valign="top" align="left">
|
715
|
+
<td width="11%"></td>
|
716
|
+
<td width="3%">
|
717
|
+
|
718
|
+
|
719
|
+
<p style="margin-top: 1em" valign="top">:x</p></td>
|
720
|
+
<td width="8%"></td>
|
721
|
+
<td width="78%">
|
722
|
+
|
723
|
+
|
724
|
+
<p style="margin-top: 1em" valign="top">Examine the first
|
725
|
+
file in the command line list. If a number N is specified,
|
726
|
+
the N-th file in the list is examined.</p></td>
|
727
|
+
<tr valign="top" align="left">
|
728
|
+
<td width="11%"></td>
|
729
|
+
<td width="3%">
|
730
|
+
|
731
|
+
|
732
|
+
<p style="margin-top: 1em" valign="top">:d</p></td>
|
733
|
+
<td width="8%"></td>
|
734
|
+
<td width="78%">
|
735
|
+
|
736
|
+
|
737
|
+
<p style="margin-top: 1em" valign="top">Remove the current
|
738
|
+
file from the list of files.</p></td>
|
739
|
+
<tr valign="top" align="left">
|
740
|
+
<td width="11%"></td>
|
741
|
+
<td width="3%">
|
742
|
+
|
743
|
+
|
744
|
+
<p style="margin-top: 1em" valign="top">t</p></td>
|
745
|
+
<td width="8%"></td>
|
746
|
+
<td width="78%">
|
747
|
+
|
748
|
+
|
749
|
+
<p style="margin-top: 1em" valign="top">Go to the next tag,
|
750
|
+
if there were more than one matches for the current tag. See
|
751
|
+
the −t option for more details about tags.</p></td>
|
752
|
+
<tr valign="top" align="left">
|
753
|
+
<td width="11%"></td>
|
754
|
+
<td width="3%">
|
755
|
+
|
756
|
+
|
757
|
+
<p style="margin-top: 1em" valign="top">T</p></td>
|
758
|
+
<td width="8%"></td>
|
759
|
+
<td width="78%">
|
760
|
+
|
761
|
+
|
762
|
+
<p style="margin-top: 1em" valign="top">Go to the previous
|
763
|
+
tag, if there were more than one matches for the current
|
764
|
+
tag.</p> </td>
|
765
|
+
</table>
|
766
|
+
|
767
|
+
<p style="margin-left:11%;">= or ^G or :f</p>
|
768
|
+
|
769
|
+
<p style="margin-left:22%;">Prints some information about
|
770
|
+
the file being viewed, including its name and the line
|
771
|
+
number and byte offset of the bottom line being displayed.
|
772
|
+
If possible, it also prints the length of the file, the
|
773
|
+
number of lines in the file and the percent of the file
|
774
|
+
above the last displayed line.</p>
|
775
|
+
|
776
|
+
<table width="100%" border=0 rules="none" frame="void"
|
777
|
+
cellspacing="0" cellpadding="0">
|
778
|
+
<tr valign="top" align="left">
|
779
|
+
<td width="11%"></td>
|
780
|
+
<td width="6%">
|
781
|
+
|
782
|
+
|
783
|
+
<p style="margin-top: 1em" valign="top">−</p></td>
|
784
|
+
<td width="5%"></td>
|
785
|
+
<td width="78%">
|
786
|
+
|
787
|
+
|
788
|
+
<p style="margin-top: 1em" valign="top">Followed by one of
|
789
|
+
the command line option letters (see OPTIONS below), this
|
790
|
+
will change the setting of that option and print a message
|
791
|
+
describing the new setting. If a ^P (CONTROL-P) is entered
|
792
|
+
immediately after the dash, the setting of the option is
|
793
|
+
changed but no message is printed. If the option letter has
|
794
|
+
a numeric value (such as −b or −h), or a string
|
795
|
+
value (such as −P or −t), a new value may be
|
796
|
+
entered after the option letter. If no new value is entered,
|
797
|
+
a message describing the current setting is printed and
|
798
|
+
nothing is changed.</p></td>
|
799
|
+
<tr valign="top" align="left">
|
800
|
+
<td width="11%"></td>
|
801
|
+
<td width="6%">
|
802
|
+
|
803
|
+
|
804
|
+
<p style="margin-top: 1em" valign="top">−−</p></td>
|
805
|
+
<td width="5%"></td>
|
806
|
+
<td width="78%">
|
807
|
+
|
808
|
+
|
809
|
+
<p style="margin-top: 1em" valign="top">Like the −
|
810
|
+
command, but takes a long option name (see OPTIONS below)
|
811
|
+
rather than a single option letter. You must press RETURN
|
812
|
+
after typing the option name. A ^P immediately after the
|
813
|
+
second dash suppresses printing of a message describing the
|
814
|
+
new setting, as in the − command.</p></td>
|
815
|
+
<tr valign="top" align="left">
|
816
|
+
<td width="11%"></td>
|
817
|
+
<td width="6%">
|
818
|
+
|
819
|
+
|
820
|
+
<p style="margin-top: 1em" valign="top">−+</p></td>
|
821
|
+
<td width="5%"></td>
|
822
|
+
<td width="78%">
|
823
|
+
|
824
|
+
|
825
|
+
<p style="margin-top: 1em" valign="top">Followed by one of
|
826
|
+
the command line option letters this will reset the option
|
827
|
+
to its default setting and print a message describing the
|
828
|
+
new setting. (The "−+<i>X</i>" command does
|
829
|
+
the same thing as "−+<i>X</i>" on the
|
830
|
+
command line.) This does not work for string-valued
|
831
|
+
options.</p> </td>
|
832
|
+
<tr valign="top" align="left">
|
833
|
+
<td width="11%"></td>
|
834
|
+
<td width="6%">
|
835
|
+
|
836
|
+
|
837
|
+
|
838
|
+
<p style="margin-top: 1em" valign="top">−−+</p> </td>
|
839
|
+
<td width="5%"></td>
|
840
|
+
<td width="78%">
|
841
|
+
|
842
|
+
|
843
|
+
<p style="margin-top: 1em" valign="top">Like the −+
|
844
|
+
command, but takes a long option name rather than a single
|
845
|
+
option letter.</p></td>
|
846
|
+
<tr valign="top" align="left">
|
847
|
+
<td width="11%"></td>
|
848
|
+
<td width="6%">
|
849
|
+
|
850
|
+
|
851
|
+
<p style="margin-top: 1em" valign="top">−!</p></td>
|
852
|
+
<td width="5%"></td>
|
853
|
+
<td width="78%">
|
854
|
+
|
855
|
+
|
856
|
+
<p style="margin-top: 1em" valign="top">Followed by one of
|
857
|
+
the command line option letters, this will reset the option
|
858
|
+
to the "opposite" of its default setting and print
|
859
|
+
a message describing the new setting. This does not work for
|
860
|
+
numeric or string-valued options.</p></td>
|
861
|
+
<tr valign="top" align="left">
|
862
|
+
<td width="11%"></td>
|
863
|
+
<td width="6%">
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
<p style="margin-top: 1em" valign="top">−−!</p> </td>
|
868
|
+
<td width="5%"></td>
|
869
|
+
<td width="78%">
|
870
|
+
|
871
|
+
|
872
|
+
<p style="margin-top: 1em" valign="top">Like the −!
|
873
|
+
command, but takes a long option name rather than a single
|
874
|
+
option letter.</p></td>
|
875
|
+
<tr valign="top" align="left">
|
876
|
+
<td width="11%"></td>
|
877
|
+
<td width="6%">
|
878
|
+
|
879
|
+
|
880
|
+
<p style="margin-top: 1em" valign="top">_</p></td>
|
881
|
+
<td width="5%"></td>
|
882
|
+
<td width="78%">
|
883
|
+
|
884
|
+
|
885
|
+
<p style="margin-top: 1em" valign="top">(Underscore.)
|
886
|
+
Followed by one of the command line option letters, this
|
887
|
+
will print a message describing the current setting of that
|
888
|
+
option. The setting of the option is not changed.</p></td>
|
889
|
+
<tr valign="top" align="left">
|
890
|
+
<td width="11%"></td>
|
891
|
+
<td width="6%">
|
892
|
+
|
893
|
+
|
894
|
+
<p style="margin-top: 1em" valign="top">__</p></td>
|
895
|
+
<td width="5%"></td>
|
896
|
+
<td width="78%">
|
897
|
+
|
898
|
+
|
899
|
+
<p style="margin-top: 1em" valign="top">(Double
|
900
|
+
underscore.) Like the _ (underscore) command, but takes a
|
901
|
+
long option name rather than a single option letter. You
|
902
|
+
must press RETURN after typing the option name.</p></td>
|
903
|
+
<tr valign="top" align="left">
|
904
|
+
<td width="11%"></td>
|
905
|
+
<td width="6%">
|
906
|
+
|
907
|
+
|
908
|
+
<p style="margin-top: 1em" valign="top">+cmd</p></td>
|
909
|
+
<td width="5%"></td>
|
910
|
+
<td width="78%">
|
911
|
+
|
912
|
+
|
913
|
+
<p style="margin-top: 1em" valign="top">Causes the
|
914
|
+
specified cmd to be executed each time a new file is
|
915
|
+
examined. For example, +G causes <i>less</i> to initially
|
916
|
+
display each file starting at the end rather than the
|
917
|
+
beginning.</p> </td>
|
918
|
+
<tr valign="top" align="left">
|
919
|
+
<td width="11%"></td>
|
920
|
+
<td width="6%">
|
921
|
+
|
922
|
+
|
923
|
+
<p style="margin-top: 1em" valign="top">V</p></td>
|
924
|
+
<td width="5%"></td>
|
925
|
+
<td width="78%">
|
926
|
+
|
927
|
+
|
928
|
+
<p style="margin-top: 1em" valign="top">Prints the version
|
929
|
+
number of <i>less</i> being run.</p></td>
|
930
|
+
</table>
|
931
|
+
|
932
|
+
<p style="margin-left:11%;">q or Q or :q or :Q or ZZ</p>
|
933
|
+
|
934
|
+
<p style="margin-left:22%;">Exits <i>less.</i></p>
|
935
|
+
|
936
|
+
<p style="margin-left:11%; margin-top: 1em">The following
|
937
|
+
four commands may or may not be valid, depending on your
|
938
|
+
particular installation.</p>
|
939
|
+
|
940
|
+
<table width="100%" border=0 rules="none" frame="void"
|
941
|
+
cellspacing="0" cellpadding="0">
|
942
|
+
<tr valign="top" align="left">
|
943
|
+
<td width="11%"></td>
|
944
|
+
<td width="1%">
|
945
|
+
|
946
|
+
|
947
|
+
<p style="margin-top: 1em" valign="top">v</p></td>
|
948
|
+
<td width="10%"></td>
|
949
|
+
<td width="78%">
|
950
|
+
|
951
|
+
|
952
|
+
<p style="margin-top: 1em" valign="top">Invokes an editor
|
953
|
+
to edit the current file being viewed. The editor is taken
|
954
|
+
from the environment variable VISUAL if defined, or EDITOR
|
955
|
+
if VISUAL is not defined, or defaults to "vi" if
|
956
|
+
neither VISUAL nor EDITOR is defined. See also the
|
957
|
+
discussion of LESSEDIT under the section on PROMPTS
|
958
|
+
below.</p> </td>
|
959
|
+
</table>
|
960
|
+
|
961
|
+
<p style="margin-left:11%;">! shell-command</p>
|
962
|
+
|
963
|
+
<p style="margin-left:22%;">Invokes a shell to run the
|
964
|
+
shell-command given. A percent sign (%) in the command is
|
965
|
+
replaced by the name of the current file. A pound sign (#)
|
966
|
+
is replaced by the name of the previously examined file.
|
967
|
+
"!!" repeats the last shell command. "!"
|
968
|
+
with no shell command simply invokes a shell. On Unix
|
969
|
+
systems, the shell is taken from the environment variable
|
970
|
+
SHELL, or defaults to "sh". On MS-DOS and OS/2
|
971
|
+
systems, the shell is the normal command processor.</p>
|
972
|
+
|
973
|
+
<p style="margin-left:11%;">| <m> shell-command</p>
|
974
|
+
|
975
|
+
<p style="margin-left:22%;"><m> represents any mark
|
976
|
+
letter. Pipes a section of the input file to the given shell
|
977
|
+
command. The section of the file to be piped is between the
|
978
|
+
first line on the current screen and the position marked by
|
979
|
+
the letter. <m> may also be ^ or $ to indicate
|
980
|
+
beginning or end of file respectively. If <m> is . or
|
981
|
+
newline, the current screen is piped.</p>
|
982
|
+
|
983
|
+
<p style="margin-left:11%;">s filename</p>
|
984
|
+
|
985
|
+
<p style="margin-left:22%;">Save the input to a file. This
|
986
|
+
only works if the input is a pipe, not an ordinary file.</p>
|
987
|
+
|
988
|
+
<a name="OPTIONS"></a>
|
989
|
+
<h2>OPTIONS</h2>
|
990
|
+
|
991
|
+
|
992
|
+
<p style="margin-left:11%; margin-top: 1em">Command line
|
993
|
+
options are described below. Most options may be changed
|
994
|
+
while <i>less</i> is running, via the "−"
|
995
|
+
command.</p>
|
996
|
+
|
997
|
+
<p style="margin-left:11%; margin-top: 1em">Most options
|
998
|
+
may be given in one of two forms: either a dash followed by
|
999
|
+
a single letter, or two dashes followed by a long option
|
1000
|
+
name. A long option name may be abbreviated as long as the
|
1001
|
+
abbreviation is unambiguous. For example,
|
1002
|
+
−−quit-at-eof may be abbreviated
|
1003
|
+
−−quit, but not --qui, since both
|
1004
|
+
−−quit-at-eof and −−quiet begin with
|
1005
|
+
−−qui. Some long option names are in uppercase,
|
1006
|
+
such as −−QUIT-AT-EOF, as distinct from
|
1007
|
+
−−quit-at-eof. Such option names need only have
|
1008
|
+
their first letter capitalized; the remainder of the name
|
1009
|
+
may be in either case. For example,
|
1010
|
+
−−Quit-at-eof is equivalent to
|
1011
|
+
−−QUIT-AT-EOF.</p>
|
1012
|
+
|
1013
|
+
<p style="margin-left:11%; margin-top: 1em">Options are
|
1014
|
+
also taken from the environment variable "LESS".
|
1015
|
+
For example, to avoid typing "less −options
|
1016
|
+
..." each time <i>less</i> is invoked, you might tell
|
1017
|
+
<i>csh:</i></p>
|
1018
|
+
|
1019
|
+
<p style="margin-left:11%; margin-top: 1em">setenv LESS
|
1020
|
+
"-options"</p>
|
1021
|
+
|
1022
|
+
<p style="margin-left:11%; margin-top: 1em">or if you use
|
1023
|
+
<i>sh:</i></p>
|
1024
|
+
|
1025
|
+
|
1026
|
+
<p style="margin-left:11%; margin-top: 1em">LESS="-options";
|
1027
|
+
export LESS</p>
|
1028
|
+
|
1029
|
+
<p style="margin-left:11%; margin-top: 1em">On MS-DOS, you
|
1030
|
+
don’t need the quotes, but you should replace any
|
1031
|
+
percent signs in the options string by double percent
|
1032
|
+
signs.</p>
|
1033
|
+
|
1034
|
+
<p style="margin-left:11%; margin-top: 1em">The environment
|
1035
|
+
variable is parsed before the command line, so command line
|
1036
|
+
options override the LESS environment variable. If an option
|
1037
|
+
appears in the LESS variable, it can be reset to its default
|
1038
|
+
value on the command line by beginning the command line
|
1039
|
+
option with "−+".</p>
|
1040
|
+
|
1041
|
+
<p style="margin-left:11%; margin-top: 1em">For options
|
1042
|
+
like −P or −D which take a following string, a
|
1043
|
+
dollar sign ($) must be used to signal the end of the
|
1044
|
+
string. For example, to set two −D options on MS-DOS,
|
1045
|
+
you must have a dollar sign between them, like this:</p>
|
1046
|
+
|
1047
|
+
|
1048
|
+
<p style="margin-left:11%; margin-top: 1em">LESS="-Dn9.1$-Ds4.1"
|
1049
|
+
<br>
|
1050
|
+
−? or −−help</p>
|
1051
|
+
|
1052
|
+
<p style="margin-left:22%;">This option displays a summary
|
1053
|
+
of the commands accepted by <i>less</i> (the same as the h
|
1054
|
+
command). (Depending on how your shell interprets the
|
1055
|
+
question mark, it may be necessary to quote the question
|
1056
|
+
mark, thus: "−\?".)</p>
|
1057
|
+
|
1058
|
+
<p style="margin-left:11%;">−a or
|
1059
|
+
−−search-skip-screen</p>
|
1060
|
+
|
1061
|
+
<p style="margin-left:22%;">Causes searches to start after
|
1062
|
+
the last line displayed on the screen, thus skipping all
|
1063
|
+
lines displayed on the screen. By default, searches start at
|
1064
|
+
the second line on the screen (or after the last found line;
|
1065
|
+
see the −j option).</p>
|
1066
|
+
|
1067
|
+
<p style="margin-left:11%;">−b<i>n</i> or
|
1068
|
+
−−buffers=<i>n</i></p>
|
1069
|
+
|
1070
|
+
<p style="margin-left:22%;">Specifies the amount of buffer
|
1071
|
+
space <i>less</i> will use for each file, in units of
|
1072
|
+
kilobytes (1024 bytes). By default 64K of buffer space is
|
1073
|
+
used for each file (unless the file is a pipe; see the
|
1074
|
+
−B option). The −b option specifies instead that
|
1075
|
+
<i>n</i> kilobytes of buffer space should be used for each
|
1076
|
+
file. If <i>n</i> is −1, buffer space is unlimited;
|
1077
|
+
that is, the entire file can be read into memory.</p>
|
1078
|
+
|
1079
|
+
<p style="margin-left:11%;">−B or
|
1080
|
+
−−auto-buffers</p>
|
1081
|
+
|
1082
|
+
<p style="margin-left:22%;">By default, when data is read
|
1083
|
+
from a pipe, buffers are allocated automatically as needed.
|
1084
|
+
If a large amount of data is read from the pipe, this can
|
1085
|
+
cause a large amount of memory to be allocated. The −B
|
1086
|
+
option disables this automatic allocation of buffers for
|
1087
|
+
pipes, so that only 64K (or the amount of space specified by
|
1088
|
+
the −b option) is used for the pipe. Warning: use of
|
1089
|
+
−B can result in erroneous display, since only the
|
1090
|
+
most recently viewed part of the piped data is kept in
|
1091
|
+
memory; any earlier data is lost.</p>
|
1092
|
+
|
1093
|
+
<p style="margin-left:11%;">−c or
|
1094
|
+
−−clear-screen</p>
|
1095
|
+
|
1096
|
+
<p style="margin-left:22%;">Causes full screen repaints to
|
1097
|
+
be painted from the top line down. By default, full screen
|
1098
|
+
repaints are done by scrolling from the bottom of the
|
1099
|
+
screen.</p>
|
1100
|
+
|
1101
|
+
<p style="margin-left:11%;">−C or
|
1102
|
+
−−CLEAR-SCREEN</p>
|
1103
|
+
|
1104
|
+
<p style="margin-left:22%;">Same as −c, for
|
1105
|
+
compatibility with older versions of <i>less.</i></p>
|
1106
|
+
|
1107
|
+
<p style="margin-left:11%;">−d or
|
1108
|
+
−−dumb</p>
|
1109
|
+
|
1110
|
+
<p style="margin-left:22%;">The −d option suppresses
|
1111
|
+
the error message normally displayed if the terminal is
|
1112
|
+
dumb; that is, lacks some important capability, such as the
|
1113
|
+
ability to clear the screen or scroll backward. The −d
|
1114
|
+
option does not otherwise change the behavior of <i>less</i>
|
1115
|
+
on a dumb terminal.</p>
|
1116
|
+
|
1117
|
+
<p style="margin-left:11%;">−D<b>x</b><i>color</i> or
|
1118
|
+
−−color=<b>x</b><i>color</i></p>
|
1119
|
+
|
1120
|
+
<p style="margin-left:22%;">[MS-DOS only] Sets the color of
|
1121
|
+
the text displayed. <b>x</b> is a single character which
|
1122
|
+
selects the type of text whose color is being set: n=normal,
|
1123
|
+
s=standout, d=bold, u=underlined, k=blink. <i>color</i> is a
|
1124
|
+
pair of numbers separated by a period. The first number
|
1125
|
+
selects the foreground color and the second selects the
|
1126
|
+
background color of the text. A single number <i>N</i> is
|
1127
|
+
the same as <i>N.0</i>.</p>
|
1128
|
+
|
1129
|
+
<p style="margin-left:11%;">−e or
|
1130
|
+
−−quit-at-eof</p>
|
1131
|
+
|
1132
|
+
<p style="margin-left:22%;">Causes <i>less</i> to
|
1133
|
+
automatically exit the second time it reaches end-of-file.
|
1134
|
+
By default, the only way to exit <i>less</i> is via the
|
1135
|
+
"q" command.</p>
|
1136
|
+
|
1137
|
+
<p style="margin-left:11%;">−E or
|
1138
|
+
−−QUIT-AT-EOF</p>
|
1139
|
+
|
1140
|
+
<p style="margin-left:22%;">Causes <i>less</i> to
|
1141
|
+
automatically exit the first time it reaches
|
1142
|
+
end-of-file.</p>
|
1143
|
+
|
1144
|
+
<p style="margin-left:11%;">−f or
|
1145
|
+
−−force</p>
|
1146
|
+
|
1147
|
+
<p style="margin-left:22%;">Forces non-regular files to be
|
1148
|
+
opened. (A non-regular file is a directory or a device
|
1149
|
+
special file.) Also suppresses the warning message when a
|
1150
|
+
binary file is opened. By default, <i>less</i> will refuse
|
1151
|
+
to open non-regular files. Note that some operating systems
|
1152
|
+
will not allow directories to be read, even if −f is
|
1153
|
+
set.</p>
|
1154
|
+
|
1155
|
+
<p style="margin-left:11%;">−F or
|
1156
|
+
−−quit-if-one-screen</p>
|
1157
|
+
|
1158
|
+
<p style="margin-left:22%;">Causes <i>less</i> to
|
1159
|
+
automatically exit if the entire file can be displayed on
|
1160
|
+
the first screen.</p>
|
1161
|
+
|
1162
|
+
<p style="margin-left:11%;">−g or
|
1163
|
+
−−hilite-search</p>
|
1164
|
+
|
1165
|
+
<p style="margin-left:22%;">Normally, <i>less</i> will
|
1166
|
+
highlight ALL strings which match the last search command.
|
1167
|
+
The −g option changes this behavior to highlight only
|
1168
|
+
the particular string which was found by the last search
|
1169
|
+
command. This can cause <i>less</i> to run somewhat faster
|
1170
|
+
than the default.</p>
|
1171
|
+
|
1172
|
+
<p style="margin-left:11%;">−G or
|
1173
|
+
−−HILITE-SEARCH</p>
|
1174
|
+
|
1175
|
+
<p style="margin-left:22%;">The −G option suppresses
|
1176
|
+
all highlighting of strings found by search commands.</p>
|
1177
|
+
|
1178
|
+
<p style="margin-left:11%;">−h<i>n</i> or
|
1179
|
+
−−max-back-scroll=<i>n</i></p>
|
1180
|
+
|
1181
|
+
<p style="margin-left:22%;">Specifies a maximum number of
|
1182
|
+
lines to scroll backward. If it is necessary to scroll
|
1183
|
+
backward more than <i>n</i> lines, the screen is repainted
|
1184
|
+
in a forward direction instead. (If the terminal does not
|
1185
|
+
have the ability to scroll backward, −h0 is
|
1186
|
+
implied.)</p>
|
1187
|
+
|
1188
|
+
<p style="margin-left:11%;">−i or
|
1189
|
+
−−ignore-case</p>
|
1190
|
+
|
1191
|
+
<p style="margin-left:22%;">Causes searches to ignore case;
|
1192
|
+
that is, uppercase and lowercase are considered identical.
|
1193
|
+
This option is ignored if any uppercase letters appear in
|
1194
|
+
the search pattern; in other words, if a pattern contains
|
1195
|
+
uppercase letters, then that search does not ignore
|
1196
|
+
case.</p>
|
1197
|
+
|
1198
|
+
<p style="margin-left:11%;">−I or
|
1199
|
+
−−IGNORE-CASE</p>
|
1200
|
+
|
1201
|
+
<p style="margin-left:22%;">Like −i, but searches
|
1202
|
+
ignore case even if the pattern contains uppercase
|
1203
|
+
letters.</p>
|
1204
|
+
|
1205
|
+
<p style="margin-left:11%;">−j<i>n</i> or
|
1206
|
+
−−jump-target=<i>n</i></p>
|
1207
|
+
|
1208
|
+
<p style="margin-left:22%;">Specifies a line on the screen
|
1209
|
+
where the "target" line is to be positioned. The
|
1210
|
+
target line is the line specified by any command to search
|
1211
|
+
for a pattern, jump to a line number, jump to a file
|
1212
|
+
percentage or jump to a tag. The screen line may be
|
1213
|
+
specified by a number: the top line on the screen is 1, the
|
1214
|
+
next is 2, and so on. The number may be negative to specify
|
1215
|
+
a line relative to the bottom of the screen: the bottom line
|
1216
|
+
on the screen is −1, the second to the bottom is
|
1217
|
+
−2, and so on. Alternately, the screen line may be
|
1218
|
+
specified as a fraction of the height of the screen,
|
1219
|
+
starting with a decimal point: .5 is in the middle of the
|
1220
|
+
screen, .3 is three tenths down from the first line, and so
|
1221
|
+
on. If the line is specified as a fraction, the actual line
|
1222
|
+
number is recalculated if the terminal window is resized, so
|
1223
|
+
that the target line remains at the specified fraction of
|
1224
|
+
the screen height. If any form of the −j option is
|
1225
|
+
used, forward searches begin at the line immediately after
|
1226
|
+
the target line, and backward searches begin at the target
|
1227
|
+
line. For example, if "−j4" is used, the
|
1228
|
+
target line is the fourth line on the screen, so forward
|
1229
|
+
searches begin at the fifth line on the screen.</p>
|
1230
|
+
|
1231
|
+
<p style="margin-left:11%;">−J or
|
1232
|
+
−−status-column</p>
|
1233
|
+
|
1234
|
+
<p style="margin-left:22%;">Displays a status column at the
|
1235
|
+
left edge of the screen. The status column shows the lines
|
1236
|
+
that matched the current search. The status column is also
|
1237
|
+
used if the −w or −W option is in effect.</p>
|
1238
|
+
|
1239
|
+
<p style="margin-left:11%;">−k<i>filename</i> or
|
1240
|
+
−−lesskey-file=<i>filename</i></p>
|
1241
|
+
|
1242
|
+
<p style="margin-left:22%;">Causes <i>less</i> to open and
|
1243
|
+
interpret the named file as a <i>lesskey</i> (1) file.
|
1244
|
+
Multiple −k options may be specified. If the LESSKEY
|
1245
|
+
or LESSKEY_SYSTEM environment variable is set, or if a
|
1246
|
+
lesskey file is found in a standard place (see KEY
|
1247
|
+
BINDINGS), it is also used as a <i>lesskey</i> file.</p>
|
1248
|
+
|
1249
|
+
<p style="margin-left:11%;">−K or
|
1250
|
+
−−quit-on-intr</p>
|
1251
|
+
|
1252
|
+
<p style="margin-left:22%;">Causes <i>less</i> to exit
|
1253
|
+
immediately when an interrupt character (usually ^C) is
|
1254
|
+
typed. Normally, an interrupt character causes <i>less</i>
|
1255
|
+
to stop whatever it is doing and return to its command
|
1256
|
+
prompt. Note that use of this option makes it impossible to
|
1257
|
+
return to the command prompt from the "F"
|
1258
|
+
command.</p>
|
1259
|
+
|
1260
|
+
<p style="margin-left:11%;">−L or
|
1261
|
+
−−no-lessopen</p>
|
1262
|
+
|
1263
|
+
<p style="margin-left:22%;">Ignore the LESSOPEN environment
|
1264
|
+
variable (see the INPUT PREPROCESSOR section below). This
|
1265
|
+
option can be set from within <i>less</i>, but it will apply
|
1266
|
+
only to files opened subsequently, not to the file which is
|
1267
|
+
currently open.</p>
|
1268
|
+
|
1269
|
+
<p style="margin-left:11%;">−m or
|
1270
|
+
−−long-prompt</p>
|
1271
|
+
|
1272
|
+
<p style="margin-left:22%;">Causes <i>less</i> to prompt
|
1273
|
+
verbosely (like <i>more</i>), with the percent into the
|
1274
|
+
file. By default, <i>less</i> prompts with a colon.</p>
|
1275
|
+
|
1276
|
+
<p style="margin-left:11%;">−M or
|
1277
|
+
−−LONG-PROMPT</p>
|
1278
|
+
|
1279
|
+
<p style="margin-left:22%;">Causes <i>less</i> to prompt
|
1280
|
+
even more verbosely than <i>more.</i></p>
|
1281
|
+
|
1282
|
+
<p style="margin-left:11%;">−n or
|
1283
|
+
−−line-numbers</p>
|
1284
|
+
|
1285
|
+
<p style="margin-left:22%;">Suppresses line numbers. The
|
1286
|
+
default (to use line numbers) may cause <i>less</i> to run
|
1287
|
+
more slowly in some cases, especially with a very large
|
1288
|
+
input file. Suppressing line numbers with the −n
|
1289
|
+
option will avoid this problem. Using line numbers means:
|
1290
|
+
the line number will be displayed in the verbose prompt and
|
1291
|
+
in the = command, and the v command will pass the current
|
1292
|
+
line number to the editor (see also the discussion of
|
1293
|
+
LESSEDIT in PROMPTS below).</p>
|
1294
|
+
|
1295
|
+
<p style="margin-left:11%;">−N or
|
1296
|
+
−−LINE-NUMBERS</p>
|
1297
|
+
|
1298
|
+
<p style="margin-left:22%;">Causes a line number to be
|
1299
|
+
displayed at the beginning of each line in the display.</p>
|
1300
|
+
|
1301
|
+
<p style="margin-left:11%;">−o<i>filename</i> or
|
1302
|
+
−−log-file=<i>filename</i></p>
|
1303
|
+
|
1304
|
+
<p style="margin-left:22%;">Causes <i>less</i> to copy its
|
1305
|
+
input to the named file as it is being viewed. This applies
|
1306
|
+
only when the input file is a pipe, not an ordinary file. If
|
1307
|
+
the file already exists, <i>less</i> will ask for
|
1308
|
+
confirmation before overwriting it.</p>
|
1309
|
+
|
1310
|
+
<p style="margin-left:11%;">−O<i>filename</i> or
|
1311
|
+
−−LOG-FILE=<i>filename</i></p>
|
1312
|
+
|
1313
|
+
<p style="margin-left:22%;">The −O option is like
|
1314
|
+
−o, but it will overwrite an existing file without
|
1315
|
+
asking for confirmation.</p>
|
1316
|
+
|
1317
|
+
<p style="margin-left:22%; margin-top: 1em">If no log file
|
1318
|
+
has been specified, the −o and −O options can be
|
1319
|
+
used from within <i>less</i> to specify a log file. Without
|
1320
|
+
a file name, they will simply report the name of the log
|
1321
|
+
file. The "s" command is equivalent to specifying
|
1322
|
+
−o from within <i>less.</i></p>
|
1323
|
+
|
1324
|
+
<p style="margin-left:11%;">−p<i>pattern</i> or
|
1325
|
+
−−pattern=<i>pattern</i></p>
|
1326
|
+
|
1327
|
+
<p style="margin-left:22%;">The −p option on the
|
1328
|
+
command line is equivalent to specifying +/<i>pattern</i>;
|
1329
|
+
that is, it tells <i>less</i> to start at the first
|
1330
|
+
occurrence of <i>pattern</i> in the file.</p>
|
1331
|
+
|
1332
|
+
<p style="margin-left:11%;">−P<i>prompt</i> or
|
1333
|
+
−−prompt=<i>prompt</i></p>
|
1334
|
+
|
1335
|
+
<p style="margin-left:22%;">Provides a way to tailor the
|
1336
|
+
three prompt styles to your own preference. This option
|
1337
|
+
would normally be put in the LESS environment variable,
|
1338
|
+
rather than being typed in with each <i>less</i> command.
|
1339
|
+
Such an option must either be the last option in the LESS
|
1340
|
+
variable, or be terminated by a dollar sign. -Ps followed by
|
1341
|
+
a string changes the default (short) prompt to that string.
|
1342
|
+
-Pm changes the medium (−m) prompt. -PM changes the
|
1343
|
+
long (−M) prompt. -Ph changes the prompt for the help
|
1344
|
+
screen. -P= changes the message printed by the = command.
|
1345
|
+
-Pw changes the message printed while waiting for data (in
|
1346
|
+
the F command). All prompt strings consist of a sequence of
|
1347
|
+
letters and special escape sequences. See the section on
|
1348
|
+
PROMPTS for more details.</p>
|
1349
|
+
|
1350
|
+
<p style="margin-left:11%;">−q or −−quiet
|
1351
|
+
or −−silent</p>
|
1352
|
+
|
1353
|
+
<p style="margin-left:22%;">Causes moderately
|
1354
|
+
"quiet" operation: the terminal bell is not rung
|
1355
|
+
if an attempt is made to scroll past the end of the file or
|
1356
|
+
before the beginning of the file. If the terminal has a
|
1357
|
+
"visual bell", it is used instead. The bell will
|
1358
|
+
be rung on certain other errors, such as typing an invalid
|
1359
|
+
character. The default is to ring the terminal bell in all
|
1360
|
+
such cases.</p>
|
1361
|
+
|
1362
|
+
<p style="margin-left:11%;">−Q or −−QUIET
|
1363
|
+
or −−SILENT</p>
|
1364
|
+
|
1365
|
+
<p style="margin-left:22%;">Causes totally
|
1366
|
+
"quiet" operation: the terminal bell is never
|
1367
|
+
rung.</p>
|
1368
|
+
|
1369
|
+
<p style="margin-left:11%;">−r or
|
1370
|
+
−−raw-control-chars</p>
|
1371
|
+
|
1372
|
+
<p style="margin-left:22%;">Causes "raw" control
|
1373
|
+
characters to be displayed. The default is to display
|
1374
|
+
control characters using the caret notation; for example, a
|
1375
|
+
control-A (octal 001) is displayed as "^A".
|
1376
|
+
Warning: when the −r option is used, <i>less</i>
|
1377
|
+
cannot keep track of the actual appearance of the screen
|
1378
|
+
(since this depends on how the screen responds to each type
|
1379
|
+
of control character). Thus, various display problems may
|
1380
|
+
result, such as long lines being split in the wrong
|
1381
|
+
place.</p>
|
1382
|
+
|
1383
|
+
<p style="margin-left:11%;">−R or
|
1384
|
+
−−RAW-CONTROL-CHARS</p>
|
1385
|
+
|
1386
|
+
<p style="margin-left:22%;">Like −r, but only ANSI
|
1387
|
+
"color" escape sequences are output in
|
1388
|
+
"raw" form. Unlike −r, the screen appearance
|
1389
|
+
is maintained correctly in most cases. ANSI
|
1390
|
+
"color" escape sequences are sequences of the
|
1391
|
+
form:</p>
|
1392
|
+
|
1393
|
+
<table width="100%" border=0 rules="none" frame="void"
|
1394
|
+
cellspacing="0" cellpadding="0">
|
1395
|
+
<tr valign="top" align="left">
|
1396
|
+
<td width="8%"></td>
|
1397
|
+
<td width="7%"></td>
|
1398
|
+
<td width="85%">
|
1399
|
+
|
1400
|
+
|
1401
|
+
<p valign="top">ESC [ ... m</p></td>
|
1402
|
+
</table>
|
1403
|
+
|
1404
|
+
<p style="margin-left:22%; margin-top: 1em">where the
|
1405
|
+
"..." is zero or more color specification
|
1406
|
+
characters For the purpose of keeping track of screen
|
1407
|
+
appearance, ANSI color escape sequences are assumed to not
|
1408
|
+
move the cursor. You can make <i>less</i> think that
|
1409
|
+
characters other than "m" can end ANSI color
|
1410
|
+
escape sequences by setting the environment variable
|
1411
|
+
LESSANSIENDCHARS to the list of characters which can end a
|
1412
|
+
color escape sequence. And you can make <i>less</i> think
|
1413
|
+
that characters other than the standard ones may appear
|
1414
|
+
between the ESC and the m by setting the environment
|
1415
|
+
variable LESSANSIMIDCHARS to the list of characters which
|
1416
|
+
can appear.</p>
|
1417
|
+
|
1418
|
+
<p style="margin-left:11%;">−s or
|
1419
|
+
−−squeeze-blank-lines</p>
|
1420
|
+
|
1421
|
+
<p style="margin-left:22%;">Causes consecutive blank lines
|
1422
|
+
to be squeezed into a single blank line. This is useful when
|
1423
|
+
viewing <i>nroff</i> output.</p>
|
1424
|
+
|
1425
|
+
<p style="margin-left:11%;">−S or
|
1426
|
+
−−chop-long-lines</p>
|
1427
|
+
|
1428
|
+
<p style="margin-left:22%;">Causes lines longer than the
|
1429
|
+
screen width to be chopped rather than folded. That is, the
|
1430
|
+
portion of a long line that does not fit in the screen width
|
1431
|
+
is not shown. The default is to fold long lines; that is,
|
1432
|
+
display the remainder on the next line.</p>
|
1433
|
+
|
1434
|
+
<p style="margin-left:11%;">−t<i>tag</i> or
|
1435
|
+
−−tag=<i>tag</i></p>
|
1436
|
+
|
1437
|
+
<p style="margin-left:22%;">The −t option, followed
|
1438
|
+
immediately by a TAG, will edit the file containing that
|
1439
|
+
tag. For this to work, tag information must be available;
|
1440
|
+
for example, there may be a file in the current directory
|
1441
|
+
called "tags", which was previously built by
|
1442
|
+
<i>ctags</i> (1) or an equivalent command. If the
|
1443
|
+
environment variable LESSGLOBALTAGS is set, it is taken to
|
1444
|
+
be the name of a command compatible with <i>global</i> (1),
|
1445
|
+
and that command is executed to find the tag. (See
|
1446
|
+
http://www.gnu.org/software/global/global.html). The
|
1447
|
+
−t option may also be specified from within
|
1448
|
+
<i>less</i> (using the − command) as a way of
|
1449
|
+
examining a new file. The command ":t" is
|
1450
|
+
equivalent to specifying −t from within
|
1451
|
+
<i>less.</i></p>
|
1452
|
+
|
1453
|
+
<p style="margin-left:11%;">−T<i>tagsfile</i> or
|
1454
|
+
−−tag-file=<i>tagsfile</i></p>
|
1455
|
+
|
1456
|
+
<p style="margin-left:22%;">Specifies a tags file to be
|
1457
|
+
used instead of "tags".</p>
|
1458
|
+
|
1459
|
+
<p style="margin-left:11%;">−u or
|
1460
|
+
−−underline-special</p>
|
1461
|
+
|
1462
|
+
<p style="margin-left:22%;">Causes backspaces and carriage
|
1463
|
+
returns to be treated as printable characters; that is, they
|
1464
|
+
are sent to the terminal when they appear in the input.</p>
|
1465
|
+
|
1466
|
+
<p style="margin-left:11%;">−U or
|
1467
|
+
−−UNDERLINE-SPECIAL</p>
|
1468
|
+
|
1469
|
+
<p style="margin-left:22%;">Causes backspaces, tabs and
|
1470
|
+
carriage returns to be treated as control characters; that
|
1471
|
+
is, they are handled as specified by the −r
|
1472
|
+
option.</p>
|
1473
|
+
|
1474
|
+
<p style="margin-left:22%; margin-top: 1em">By default, if
|
1475
|
+
neither −u nor −U is given, backspaces which
|
1476
|
+
appear adjacent to an underscore character are treated
|
1477
|
+
specially: the underlined text is displayed using the
|
1478
|
+
terminal’s hardware underlining capability. Also,
|
1479
|
+
backspaces which appear between two identical characters are
|
1480
|
+
treated specially: the overstruck text is printed using the
|
1481
|
+
terminal’s hardware boldface capability. Other
|
1482
|
+
backspaces are deleted, along with the preceding character.
|
1483
|
+
Carriage returns immediately followed by a newline are
|
1484
|
+
deleted. other carriage returns are handled as specified by
|
1485
|
+
the −r option. Text which is overstruck or underlined
|
1486
|
+
can be searched for if neither −u nor −U is in
|
1487
|
+
effect.</p>
|
1488
|
+
|
1489
|
+
<p style="margin-left:11%;">−V or
|
1490
|
+
−−version</p>
|
1491
|
+
|
1492
|
+
<p style="margin-left:22%;">Displays the version number of
|
1493
|
+
<i>less.</i></p>
|
1494
|
+
|
1495
|
+
<p style="margin-left:11%;">−w or
|
1496
|
+
−−hilite-unread</p>
|
1497
|
+
|
1498
|
+
<p style="margin-left:22%;">Temporarily highlights the
|
1499
|
+
first "new" line after a forward movement of a
|
1500
|
+
full page. The first "new" line is the line
|
1501
|
+
immediately following the line previously at the bottom of
|
1502
|
+
the screen. Also highlights the target line after a g or p
|
1503
|
+
command. The highlight is removed at the next command which
|
1504
|
+
causes movement. The entire line is highlighted, unless the
|
1505
|
+
−J option is in effect, in which case only the status
|
1506
|
+
column is highlighted.</p>
|
1507
|
+
|
1508
|
+
<p style="margin-left:11%;">−W or
|
1509
|
+
−−HILITE-UNREAD</p>
|
1510
|
+
|
1511
|
+
<p style="margin-left:22%;">Like −w, but temporarily
|
1512
|
+
highlights the first new line after any forward movement
|
1513
|
+
command larger than one line.</p>
|
1514
|
+
|
1515
|
+
<p style="margin-left:11%;">−x<i>n</i>,... or
|
1516
|
+
−−tabs=<i>n</i>,...</p>
|
1517
|
+
|
1518
|
+
<p style="margin-left:22%;">Sets tab stops. If only one
|
1519
|
+
<i>n</i> is specified, tab stops are set at multiples of
|
1520
|
+
<i>n</i>. If multiple values separated by commas are
|
1521
|
+
specified, tab stops are set at those positions, and then
|
1522
|
+
continue with the same spacing as the last two. For example,
|
1523
|
+
<i>-x9,17</i> will set tabs at positions 9, 17, 25, 33, etc.
|
1524
|
+
The default for <i>n</i> is 8.</p>
|
1525
|
+
|
1526
|
+
<p style="margin-left:11%;">−X or
|
1527
|
+
−−no-init</p>
|
1528
|
+
|
1529
|
+
<p style="margin-left:22%;">Disables sending the termcap
|
1530
|
+
initialization and deinitialization strings to the terminal.
|
1531
|
+
This is sometimes desirable if the deinitialization string
|
1532
|
+
does something unnecessary, like clearing the screen.</p>
|
1533
|
+
|
1534
|
+
<p style="margin-left:11%;">−y<i>n</i> or
|
1535
|
+
−−max-forw-scroll=<i>n</i></p>
|
1536
|
+
|
1537
|
+
<p style="margin-left:22%;">Specifies a maximum number of
|
1538
|
+
lines to scroll forward. If it is necessary to scroll
|
1539
|
+
forward more than <i>n</i> lines, the screen is repainted
|
1540
|
+
instead. The −c or −C option may be used to
|
1541
|
+
repaint from the top of the screen if desired. By default,
|
1542
|
+
any forward movement causes scrolling.</p>
|
1543
|
+
|
1544
|
+
<p style="margin-left:11%;">−[z]<i>n</i> or
|
1545
|
+
−−window=<i>n</i></p>
|
1546
|
+
|
1547
|
+
<p style="margin-left:22%;">Changes the default scrolling
|
1548
|
+
window size to <i>n</i> lines. The default is one screenful.
|
1549
|
+
The z and w commands can also be used to change the window
|
1550
|
+
size. The "z" may be omitted for compatibility
|
1551
|
+
with some versions of <i>more.</i> If the number <i>n</i> is
|
1552
|
+
negative, it indicates <i>n</i> lines less than the current
|
1553
|
+
screen size. For example, if the screen is 24 lines,
|
1554
|
+
<i>−z-4</i> sets the scrolling window to 20 lines. If
|
1555
|
+
the screen is resized to 40 lines, the scrolling window
|
1556
|
+
automatically changes to 36 lines.</p>
|
1557
|
+
|
1558
|
+
|
1559
|
+
<p style="margin-left:11%;">−<i>"cc </i>or −−quotes=<i>cc</i></p>
|
1560
|
+
|
1561
|
+
<p style="margin-left:22%;">Changes the filename quoting
|
1562
|
+
character. This may be necessary if you are trying to name a
|
1563
|
+
file which contains both spaces and quote characters.
|
1564
|
+
Followed by a single character, this changes the quote
|
1565
|
+
character to that character. Filenames containing a space
|
1566
|
+
should then be surrounded by that character rather than by
|
1567
|
+
double quotes. Followed by two characters, changes the open
|
1568
|
+
quote to the first character, and the close quote to the
|
1569
|
+
second character. Filenames containing a space should then
|
1570
|
+
be preceded by the open quote character and followed by the
|
1571
|
+
close quote character. Note that even after the quote
|
1572
|
+
characters are changed, this option remains −" (a
|
1573
|
+
dash followed by a double quote).</p>
|
1574
|
+
|
1575
|
+
<p style="margin-left:11%;">−~ or
|
1576
|
+
−−tilde</p>
|
1577
|
+
|
1578
|
+
<p style="margin-left:22%;">Normally lines after end of
|
1579
|
+
file are displayed as a single tilde (~). This option causes
|
1580
|
+
lines after end of file to be displayed as blank lines.</p>
|
1581
|
+
|
1582
|
+
<p style="margin-left:11%;">−# or
|
1583
|
+
−−shift</p>
|
1584
|
+
|
1585
|
+
<p style="margin-left:22%;">Specifies the default number of
|
1586
|
+
positions to scroll horizontally in the RIGHTARROW and
|
1587
|
+
LEFTARROW commands. If the number specified is zero, it sets
|
1588
|
+
the default number of positions to one half of the screen
|
1589
|
+
width.</p>
|
1590
|
+
|
1591
|
+
<p style="margin-left:11%;">−−no-keypad</p>
|
1592
|
+
|
1593
|
+
<p style="margin-left:22%;">Disables sending the keypad
|
1594
|
+
initialization and deinitialization strings to the terminal.
|
1595
|
+
This is sometimes useful if the keypad strings make the
|
1596
|
+
numeric keypad behave in an undesirable manner.</p>
|
1597
|
+
|
1598
|
+
<p style="margin-left:11%;">−−follow-name</p>
|
1599
|
+
|
1600
|
+
<p style="margin-left:22%;">Normally, if the input file is
|
1601
|
+
renamed while an F command is executing, <i>less</i> will
|
1602
|
+
continue to display the contents of the original file
|
1603
|
+
despite its name change. If −−follow-name is
|
1604
|
+
specified, during an F command <i>less</i> will periodically
|
1605
|
+
attempt to reopen the file by name. If the reopen succeeds
|
1606
|
+
and the file is a different file from the original (which
|
1607
|
+
means that a new file has been created with the same name as
|
1608
|
+
the original (now renamed) file), <i>less</i> will display
|
1609
|
+
the contents of that new file.</p>
|
1610
|
+
|
1611
|
+
<table width="100%" border=0 rules="none" frame="void"
|
1612
|
+
cellspacing="0" cellpadding="0">
|
1613
|
+
<tr valign="top" align="left">
|
1614
|
+
<td width="11%"></td>
|
1615
|
+
<td width="3%">
|
1616
|
+
|
1617
|
+
|
1618
|
+
<p style="margin-top: 1em" valign="top">−−</p></td>
|
1619
|
+
<td width="8%"></td>
|
1620
|
+
<td width="78%">
|
1621
|
+
|
1622
|
+
|
1623
|
+
<p style="margin-top: 1em" valign="top">A command line
|
1624
|
+
argument of "−−" marks the end of
|
1625
|
+
option arguments. Any arguments following this are
|
1626
|
+
interpreted as filenames. This can be useful when viewing a
|
1627
|
+
file whose name begins with a "−" or
|
1628
|
+
"+".</p> </td>
|
1629
|
+
<tr valign="top" align="left">
|
1630
|
+
<td width="11%"></td>
|
1631
|
+
<td width="3%">
|
1632
|
+
|
1633
|
+
|
1634
|
+
<p style="margin-top: 1em" valign="top">+</p></td>
|
1635
|
+
<td width="8%"></td>
|
1636
|
+
<td width="78%">
|
1637
|
+
|
1638
|
+
|
1639
|
+
<p style="margin-top: 1em" valign="top">If a command line
|
1640
|
+
option begins with <b>+</b>, the remainder of that option is
|
1641
|
+
taken to be an initial command to <i>less.</i> For example,
|
1642
|
+
+G tells <i>less</i> to start at the end of the file rather
|
1643
|
+
than the beginning, and +/xyz tells it to start at the first
|
1644
|
+
occurrence of "xyz" in the file. As a special
|
1645
|
+
case, +<number> acts like +<number>g; that is,
|
1646
|
+
it starts the display at the specified line number (however,
|
1647
|
+
see the caveat under the "g" command above). If
|
1648
|
+
the option starts with ++, the initial command applies to
|
1649
|
+
every file being viewed, not just the first one. The +
|
1650
|
+
command described previously may also be used to set (or
|
1651
|
+
change) an initial command for every file.</p></td>
|
1652
|
+
</table>
|
1653
|
+
|
1654
|
+
<a name="LINE EDITING"></a>
|
1655
|
+
<h2>LINE EDITING</h2>
|
1656
|
+
|
1657
|
+
|
1658
|
+
<p style="margin-left:11%; margin-top: 1em">When entering
|
1659
|
+
command line at the bottom of the screen (for example, a
|
1660
|
+
filename for the :e command, or the pattern for a search
|
1661
|
+
command), certain keys can be used to manipulate the command
|
1662
|
+
line. Most commands have an alternate form in [ brackets ]
|
1663
|
+
which can be used if a key does not exist on a particular
|
1664
|
+
keyboard. (Note that the forms beginning with ESC do not
|
1665
|
+
work in some MS-DOS and Windows systems because ESC is the
|
1666
|
+
line erase character.) Any of these special keys may be
|
1667
|
+
entered literally by preceding it with the
|
1668
|
+
"literal" character, either ^V or ^A. A backslash
|
1669
|
+
itself may also be entered literally by entering two
|
1670
|
+
backslashes. <br>
|
1671
|
+
LEFTARROW [ ESC-h ]</p>
|
1672
|
+
|
1673
|
+
<p style="margin-left:22%;">Move the cursor one space to
|
1674
|
+
the left.</p>
|
1675
|
+
|
1676
|
+
<p style="margin-left:11%;">RIGHTARROW [ ESC-l ]</p>
|
1677
|
+
|
1678
|
+
<p style="margin-left:22%;">Move the cursor one space to
|
1679
|
+
the right.</p>
|
1680
|
+
|
1681
|
+
<p style="margin-left:11%;">^LEFTARROW [ ESC-b or
|
1682
|
+
ESC-LEFTARROW ]</p>
|
1683
|
+
|
1684
|
+
<p style="margin-left:22%;">(That is, CONTROL and LEFTARROW
|
1685
|
+
simultaneously.) Move the cursor one word to the left.</p>
|
1686
|
+
|
1687
|
+
<p style="margin-left:11%;">^RIGHTARROW [ ESC-w or
|
1688
|
+
ESC-RIGHTARROW ]</p>
|
1689
|
+
|
1690
|
+
<p style="margin-left:22%;">(That is, CONTROL and
|
1691
|
+
RIGHTARROW simultaneously.) Move the cursor one word to the
|
1692
|
+
right.</p>
|
1693
|
+
|
1694
|
+
<p style="margin-left:11%;">HOME [ ESC-0 ]</p>
|
1695
|
+
|
1696
|
+
<p style="margin-left:22%;">Move the cursor to the
|
1697
|
+
beginning of the line.</p>
|
1698
|
+
|
1699
|
+
<p style="margin-left:11%;">END [ ESC-$ ]</p>
|
1700
|
+
|
1701
|
+
<p style="margin-left:22%;">Move the cursor to the end of
|
1702
|
+
the line.</p>
|
1703
|
+
|
1704
|
+
<p style="margin-left:11%;">BACKSPACE</p>
|
1705
|
+
|
1706
|
+
<p style="margin-left:22%;">Delete the character to the
|
1707
|
+
left of the cursor, or cancel the command if the command
|
1708
|
+
line is empty.</p>
|
1709
|
+
|
1710
|
+
<p style="margin-left:11%;">DELETE or [ ESC-x ]</p>
|
1711
|
+
|
1712
|
+
<p style="margin-left:22%;">Delete the character under the
|
1713
|
+
cursor.</p>
|
1714
|
+
|
1715
|
+
<p style="margin-left:11%;">^BACKSPACE [ ESC-BACKSPACE
|
1716
|
+
]</p>
|
1717
|
+
|
1718
|
+
<p style="margin-left:22%;">(That is, CONTROL and BACKSPACE
|
1719
|
+
simultaneously.) Delete the word to the left of the
|
1720
|
+
cursor.</p>
|
1721
|
+
|
1722
|
+
<p style="margin-left:11%;">^DELETE [ ESC-X or ESC-DELETE
|
1723
|
+
]</p>
|
1724
|
+
|
1725
|
+
<p style="margin-left:22%;">(That is, CONTROL and DELETE
|
1726
|
+
simultaneously.) Delete the word under the cursor.</p>
|
1727
|
+
|
1728
|
+
<p style="margin-left:11%;">UPARROW [ ESC-k ]</p>
|
1729
|
+
|
1730
|
+
<p style="margin-left:22%;">Retrieve the previous command
|
1731
|
+
line.</p>
|
1732
|
+
|
1733
|
+
<p style="margin-left:11%;">DOWNARROW [ ESC-j ]</p>
|
1734
|
+
|
1735
|
+
<p style="margin-left:22%;">Retrieve the next command
|
1736
|
+
line.</p>
|
1737
|
+
|
1738
|
+
<table width="100%" border=0 rules="none" frame="void"
|
1739
|
+
cellspacing="0" cellpadding="0">
|
1740
|
+
<tr valign="top" align="left">
|
1741
|
+
<td width="11%"></td>
|
1742
|
+
<td width="4%">
|
1743
|
+
|
1744
|
+
|
1745
|
+
<p style="margin-top: 1em" valign="top">TAB</p></td>
|
1746
|
+
<td width="7%"></td>
|
1747
|
+
<td width="78%">
|
1748
|
+
|
1749
|
+
|
1750
|
+
<p style="margin-top: 1em" valign="top">Complete the
|
1751
|
+
partial filename to the left of the cursor. If it matches
|
1752
|
+
more than one filename, the first match is entered into the
|
1753
|
+
command line. Repeated TABs will cycle thru the other
|
1754
|
+
matching filenames. If the completed filename is a
|
1755
|
+
directory, a "/" is appended to the filename. (On
|
1756
|
+
MS-DOS systems, a "\" is appended.) The
|
1757
|
+
environment variable LESSSEPARATOR can be used to specify a
|
1758
|
+
different character to append to a directory name.</p></td>
|
1759
|
+
</table>
|
1760
|
+
|
1761
|
+
<p style="margin-left:11%;">BACKTAB [ ESC-TAB ]</p>
|
1762
|
+
|
1763
|
+
<p style="margin-left:22%;">Like, TAB, but cycles in the
|
1764
|
+
reverse direction thru the matching filenames.</p>
|
1765
|
+
|
1766
|
+
<table width="100%" border=0 rules="none" frame="void"
|
1767
|
+
cellspacing="0" cellpadding="0">
|
1768
|
+
<tr valign="top" align="left">
|
1769
|
+
<td width="11%"></td>
|
1770
|
+
<td width="3%">
|
1771
|
+
|
1772
|
+
|
1773
|
+
<p style="margin-top: 1em" valign="top">^L</p></td>
|
1774
|
+
<td width="8%"></td>
|
1775
|
+
<td width="78%">
|
1776
|
+
|
1777
|
+
|
1778
|
+
<p style="margin-top: 1em" valign="top">Complete the
|
1779
|
+
partial filename to the left of the cursor. If it matches
|
1780
|
+
more than one filename, all matches are entered into the
|
1781
|
+
command line (if they fit).</p></td>
|
1782
|
+
</table>
|
1783
|
+
|
1784
|
+
<p style="margin-left:11%;">^U (Unix and OS/2) or ESC
|
1785
|
+
(MS-DOS)</p>
|
1786
|
+
|
1787
|
+
<p style="margin-left:22%;">Delete the entire command line,
|
1788
|
+
or cancel the command if the command line is empty. If you
|
1789
|
+
have changed your line-kill character in Unix to something
|
1790
|
+
other than ^U, that character is used instead of ^U.</p>
|
1791
|
+
|
1792
|
+
<a name="KEY BINDINGS"></a>
|
1793
|
+
<h2>KEY BINDINGS</h2>
|
1794
|
+
|
1795
|
+
|
1796
|
+
<p style="margin-left:11%; margin-top: 1em">You may define
|
1797
|
+
your own <i>less</i> commands by using the program
|
1798
|
+
<i>lesskey</i> (1) to create a lesskey file. This file
|
1799
|
+
specifies a set of command keys and an action associated
|
1800
|
+
with each key. You may also use <i>lesskey</i> to change the
|
1801
|
+
line-editing keys (see LINE EDITING), and to set environment
|
1802
|
+
variables. If the environment variable LESSKEY is set,
|
1803
|
+
<i>less</i> uses that as the name of the lesskey file.
|
1804
|
+
Otherwise, <i>less</i> looks in a standard place for the
|
1805
|
+
lesskey file: On Unix systems, <i>less</i> looks for a
|
1806
|
+
lesskey file called "$HOME/.less". On MS-DOS and
|
1807
|
+
Windows systems, <i>less</i> looks for a lesskey file called
|
1808
|
+
"$HOME/_less", and if it is not found there, then
|
1809
|
+
looks for a lesskey file called "_less" in any
|
1810
|
+
directory specified in the PATH environment variable. On
|
1811
|
+
OS/2 systems, <i>less</i> looks for a lesskey file called
|
1812
|
+
"$HOME/less.ini", and if it is not found, then
|
1813
|
+
looks for a lesskey file called "less.ini" in any
|
1814
|
+
directory specified in the INIT environment variable, and if
|
1815
|
+
it not found there, then looks for a lesskey file called
|
1816
|
+
"less.ini" in any directory specified in the PATH
|
1817
|
+
environment variable. See the <i>lesskey</i> manual page for
|
1818
|
+
more details.</p>
|
1819
|
+
|
1820
|
+
<p style="margin-left:11%; margin-top: 1em">A system-wide
|
1821
|
+
lesskey file may also be set up to provide key bindings. If
|
1822
|
+
a key is defined in both a local lesskey file and in the
|
1823
|
+
system-wide file, key bindings in the local file take
|
1824
|
+
precedence over those in the system-wide file. If the
|
1825
|
+
environment variable LESSKEY_SYSTEM is set, <i>less</i> uses
|
1826
|
+
that as the name of the system-wide lesskey file. Otherwise,
|
1827
|
+
<i>less</i> looks in a standard place for the system-wide
|
1828
|
+
lesskey file: On Unix systems, the system-wide lesskey file
|
1829
|
+
is /usr/local/etc/sysless. (However, if <i>less</i> was
|
1830
|
+
built with a different sysconf directory than
|
1831
|
+
/usr/local/etc, that directory is where the sysless file is
|
1832
|
+
found.) On MS-DOS and Windows systems, the system-wide
|
1833
|
+
lesskey file is c:\_sysless. On OS/2 systems, the
|
1834
|
+
system-wide lesskey file is c:\sysless.ini.</p>
|
1835
|
+
|
1836
|
+
<a name="INPUT PREPROCESSOR"></a>
|
1837
|
+
<h2>INPUT PREPROCESSOR</h2>
|
1838
|
+
|
1839
|
+
|
1840
|
+
<p style="margin-left:11%; margin-top: 1em">You may define
|
1841
|
+
an "input preprocessor" for <i>less.</i> Before
|
1842
|
+
<i>less</i> opens a file, it first gives your input
|
1843
|
+
preprocessor a chance to modify the way the contents of the
|
1844
|
+
file are displayed. An input preprocessor is simply an
|
1845
|
+
executable program (or shell script), which writes the
|
1846
|
+
contents of the file to a different file, called the
|
1847
|
+
replacement file. The contents of the replacement file are
|
1848
|
+
then displayed in place of the contents of the original
|
1849
|
+
file. However, it will appear to the user as if the original
|
1850
|
+
file is opened; that is, <i>less</i> will display the
|
1851
|
+
original filename as the name of the current file.</p>
|
1852
|
+
|
1853
|
+
<p style="margin-left:11%; margin-top: 1em">An input
|
1854
|
+
preprocessor receives one command line argument, the
|
1855
|
+
original filename, as entered by the user. It should create
|
1856
|
+
the replacement file, and when finished, print the name of
|
1857
|
+
the replacement file to its standard output. If the input
|
1858
|
+
preprocessor does not output a replacement filename,
|
1859
|
+
<i>less</i> uses the original file, as normal. The input
|
1860
|
+
preprocessor is not called when viewing standard input. To
|
1861
|
+
set up an input preprocessor, set the LESSOPEN environment
|
1862
|
+
variable to a command line which will invoke your input
|
1863
|
+
preprocessor. This command line should include one
|
1864
|
+
occurrence of the string "%s", which will be
|
1865
|
+
replaced by the filename when the input preprocessor command
|
1866
|
+
is invoked.</p>
|
1867
|
+
|
1868
|
+
<p style="margin-left:11%; margin-top: 1em">When
|
1869
|
+
<i>less</i> closes a file opened in such a way, it will call
|
1870
|
+
another program, called the input postprocessor, which may
|
1871
|
+
perform any desired clean-up action (such as deleting the
|
1872
|
+
replacement file created by LESSOPEN). This program receives
|
1873
|
+
two command line arguments, the original filename as entered
|
1874
|
+
by the user, and the name of the replacement file. To set up
|
1875
|
+
an input postprocessor, set the LESSCLOSE environment
|
1876
|
+
variable to a command line which will invoke your input
|
1877
|
+
postprocessor. It may include two occurrences of the string
|
1878
|
+
"%s"; the first is replaced with the original name
|
1879
|
+
of the file and the second with the name of the replacement
|
1880
|
+
file, which was output by LESSOPEN.</p>
|
1881
|
+
|
1882
|
+
<p style="margin-left:11%; margin-top: 1em">For example, on
|
1883
|
+
many Unix systems, these two scripts will allow you to keep
|
1884
|
+
files in compressed format, but still let <i>less</i> view
|
1885
|
+
them directly:</p>
|
1886
|
+
|
1887
|
+
|
1888
|
+
<p style="margin-left:11%; margin-top: 1em">lessopen.sh:</p>
|
1889
|
+
|
1890
|
+
<table width="100%" border=0 rules="none" frame="void"
|
1891
|
+
cellspacing="0" cellpadding="0">
|
1892
|
+
<tr valign="top" align="left">
|
1893
|
+
<td width="8%"></td>
|
1894
|
+
<td width="7%"></td>
|
1895
|
+
<td width="8%">
|
1896
|
+
|
1897
|
+
|
1898
|
+
<p valign="top">#! /bin/sh</p></td>
|
1899
|
+
<td width="8%"></td>
|
1900
|
+
<td width="69%">
|
1901
|
+
</td>
|
1902
|
+
<tr valign="top" align="left">
|
1903
|
+
<td width="8%"></td>
|
1904
|
+
<td width="7%"></td>
|
1905
|
+
<td width="8%">
|
1906
|
+
|
1907
|
+
|
1908
|
+
<p valign="top">case "$1" in</p></td>
|
1909
|
+
<td width="8%"></td>
|
1910
|
+
<td width="69%">
|
1911
|
+
</td>
|
1912
|
+
<tr valign="top" align="left">
|
1913
|
+
<td width="8%"></td>
|
1914
|
+
<td width="7%">
|
1915
|
+
</td>
|
1916
|
+
<td width="8%">
|
1917
|
+
|
1918
|
+
|
1919
|
+
<p valign="top">*.Z)</p></td>
|
1920
|
+
<td width="8%">
|
1921
|
+
|
1922
|
+
|
1923
|
+
<p valign="top">uncompress -</p></td>
|
1924
|
+
<td width="69%">
|
1925
|
+
</td>
|
1926
|
+
<tr valign="top" align="left">
|
1927
|
+
<td width="8%"></td>
|
1928
|
+
<td width="7%">
|
1929
|
+
</td>
|
1930
|
+
<td width="8%">
|
1931
|
+
</td>
|
1932
|
+
<td width="8%">
|
1933
|
+
|
1934
|
+
|
1935
|
+
<p valign="top">if [ −s /tmp/less.$$ ]; then</p></td>
|
1936
|
+
<td width="69%">
|
1937
|
+
</td>
|
1938
|
+
<tr valign="top" align="left">
|
1939
|
+
<td width="8%"></td>
|
1940
|
+
<td width="7%">
|
1941
|
+
</td>
|
1942
|
+
<td width="8%">
|
1943
|
+
</td>
|
1944
|
+
<td width="8%">
|
1945
|
+
</td>
|
1946
|
+
<td width="69%">
|
1947
|
+
|
1948
|
+
|
1949
|
+
<p valign="top">echo /tmp/less.$$</p></td>
|
1950
|
+
<tr valign="top" align="left">
|
1951
|
+
<td width="8%"></td>
|
1952
|
+
<td width="7%">
|
1953
|
+
</td>
|
1954
|
+
<td width="8%">
|
1955
|
+
</td>
|
1956
|
+
<td width="8%">
|
1957
|
+
|
1958
|
+
|
1959
|
+
<p valign="top">else</p></td>
|
1960
|
+
<td width="69%">
|
1961
|
+
</td>
|
1962
|
+
<tr valign="top" align="left">
|
1963
|
+
<td width="8%"></td>
|
1964
|
+
<td width="7%">
|
1965
|
+
</td>
|
1966
|
+
<td width="8%">
|
1967
|
+
</td>
|
1968
|
+
<td width="8%">
|
1969
|
+
</td>
|
1970
|
+
<td width="69%">
|
1971
|
+
|
1972
|
+
|
1973
|
+
<p valign="top">rm −f /tmp/less.$$</p></td>
|
1974
|
+
<tr valign="top" align="left">
|
1975
|
+
<td width="8%"></td>
|
1976
|
+
<td width="7%">
|
1977
|
+
</td>
|
1978
|
+
<td width="8%">
|
1979
|
+
</td>
|
1980
|
+
<td width="8%">
|
1981
|
+
|
1982
|
+
|
1983
|
+
<p valign="top">fi</p></td>
|
1984
|
+
<td width="69%">
|
1985
|
+
</td>
|
1986
|
+
<tr valign="top" align="left">
|
1987
|
+
<td width="8%"></td>
|
1988
|
+
<td width="7%">
|
1989
|
+
</td>
|
1990
|
+
<td width="8%">
|
1991
|
+
</td>
|
1992
|
+
<td width="8%">
|
1993
|
+
|
1994
|
+
|
1995
|
+
<p valign="top">;;</p></td>
|
1996
|
+
<td width="69%">
|
1997
|
+
</td>
|
1998
|
+
<tr valign="top" align="left">
|
1999
|
+
<td width="8%"></td>
|
2000
|
+
<td width="7%"></td>
|
2001
|
+
<td width="8%">
|
2002
|
+
|
2003
|
+
|
2004
|
+
<p valign="top">esac</p></td>
|
2005
|
+
<td width="8%"></td>
|
2006
|
+
<td width="69%">
|
2007
|
+
</td>
|
2008
|
+
</table>
|
2009
|
+
|
2010
|
+
|
2011
|
+
<p style="margin-left:11%; margin-top: 1em">lessclose.sh:</p>
|
2012
|
+
|
2013
|
+
<table width="100%" border=0 rules="none" frame="void"
|
2014
|
+
cellspacing="0" cellpadding="0">
|
2015
|
+
<tr valign="top" align="left">
|
2016
|
+
<td width="8%"></td>
|
2017
|
+
<td width="92%">
|
2018
|
+
|
2019
|
+
|
2020
|
+
<p valign="top">#! /bin/sh</p></td>
|
2021
|
+
<tr valign="top" align="left">
|
2022
|
+
<td width="8%"></td>
|
2023
|
+
<td width="92%">
|
2024
|
+
|
2025
|
+
|
2026
|
+
<p valign="top">rm $2</p></td>
|
2027
|
+
</table>
|
2028
|
+
|
2029
|
+
<p style="margin-left:11%; margin-top: 1em">To use these
|
2030
|
+
scripts, put them both where they can be executed and set
|
2031
|
+
LESSOPEN="lessopen.sh %s", and
|
2032
|
+
LESSCLOSE="lessclose.sh %s %s". More
|
2033
|
+
complex LESSOPEN and LESSCLOSE scripts may be written to
|
2034
|
+
accept other types of compressed files, and so on.</p>
|
2035
|
+
|
2036
|
+
<p style="margin-left:11%; margin-top: 1em">It is also
|
2037
|
+
possible to set up an input preprocessor to pipe the file
|
2038
|
+
data directly to <i>less,</i> rather than putting the data
|
2039
|
+
into a replacement file. This avoids the need to decompress
|
2040
|
+
the entire file before starting to view it. An input
|
2041
|
+
preprocessor that works this way is called an input pipe. An
|
2042
|
+
input pipe, instead of writing the name of a replacement
|
2043
|
+
file on its standard output, writes the entire contents of
|
2044
|
+
the replacement file on its standard output. If the input
|
2045
|
+
pipe does not write any characters on its standard output,
|
2046
|
+
then there is no replacement file and <i>less</i> uses the
|
2047
|
+
original file, as normal. To use an input pipe, make the
|
2048
|
+
first character in the LESSOPEN environment variable a
|
2049
|
+
vertical bar (|) to signify that the input preprocessor is
|
2050
|
+
an input pipe.</p>
|
2051
|
+
|
2052
|
+
<p style="margin-left:11%; margin-top: 1em">For example, on
|
2053
|
+
many Unix systems, this script will work like the previous
|
2054
|
+
example scripts:</p>
|
2055
|
+
|
2056
|
+
|
2057
|
+
<p style="margin-left:11%; margin-top: 1em">lesspipe.sh:</p>
|
2058
|
+
|
2059
|
+
<table width="100%" border=0 rules="none" frame="void"
|
2060
|
+
cellspacing="0" cellpadding="0">
|
2061
|
+
<tr valign="top" align="left">
|
2062
|
+
<td width="8%"></td>
|
2063
|
+
<td width="7%"></td>
|
2064
|
+
<td width="8%">
|
2065
|
+
|
2066
|
+
|
2067
|
+
<p valign="top">#! /bin/sh</p></td>
|
2068
|
+
<td width="77%">
|
2069
|
+
</td>
|
2070
|
+
<tr valign="top" align="left">
|
2071
|
+
<td width="8%"></td>
|
2072
|
+
<td width="7%"></td>
|
2073
|
+
<td width="8%">
|
2074
|
+
|
2075
|
+
|
2076
|
+
<p valign="top">case "$1" in</p></td>
|
2077
|
+
<td width="77%">
|
2078
|
+
</td>
|
2079
|
+
<tr valign="top" align="left">
|
2080
|
+
<td width="8%"></td>
|
2081
|
+
<td width="7%">
|
2082
|
+
</td>
|
2083
|
+
<td width="8%">
|
2084
|
+
|
2085
|
+
|
2086
|
+
<p valign="top">*.Z)</p></td>
|
2087
|
+
<td width="77%">
|
2088
|
+
|
2089
|
+
|
2090
|
+
<p valign="top">uncompress −c $1 2>/dev/null</p></td>
|
2091
|
+
<tr valign="top" align="left">
|
2092
|
+
<td width="8%"></td>
|
2093
|
+
<td width="7%">
|
2094
|
+
</td>
|
2095
|
+
<td width="8%">
|
2096
|
+
</td>
|
2097
|
+
<td width="77%">
|
2098
|
+
|
2099
|
+
|
2100
|
+
<p valign="top">;;</p></td>
|
2101
|
+
<tr valign="top" align="left">
|
2102
|
+
<td width="8%"></td>
|
2103
|
+
<td width="7%"></td>
|
2104
|
+
<td width="8%">
|
2105
|
+
|
2106
|
+
|
2107
|
+
<p valign="top">esac</p></td>
|
2108
|
+
<td width="77%">
|
2109
|
+
</td>
|
2110
|
+
</table>
|
2111
|
+
|
2112
|
+
<p style="margin-left:11%; margin-top: 1em">To use this
|
2113
|
+
script, put it where it can be executed and set
|
2114
|
+
LESSOPEN="|lesspipe.sh %s". When an input pipe is
|
2115
|
+
used, a LESSCLOSE postprocessor can be used, but it is
|
2116
|
+
usually not necessary since there is no replacement file to
|
2117
|
+
clean up. In this case, the replacement file name passed to
|
2118
|
+
the LESSCLOSE postprocessor is "−".</p>
|
2119
|
+
|
2120
|
+
<a name="NATIONAL CHARACTER SETS"></a>
|
2121
|
+
<h2>NATIONAL CHARACTER SETS</h2>
|
2122
|
+
|
2123
|
+
|
2124
|
+
<p style="margin-left:11%; margin-top: 1em">There are three
|
2125
|
+
types of characters in the input file: <br>
|
2126
|
+
normal characters</p>
|
2127
|
+
|
2128
|
+
<p style="margin-left:22%;">can be displayed directly to
|
2129
|
+
the screen.</p>
|
2130
|
+
|
2131
|
+
<p style="margin-left:11%;">control characters</p>
|
2132
|
+
|
2133
|
+
<p style="margin-left:22%;">should not be displayed
|
2134
|
+
directly, but are expected to be found in ordinary text
|
2135
|
+
files (such as backspace and tab).</p>
|
2136
|
+
|
2137
|
+
<p style="margin-left:11%;">binary characters</p>
|
2138
|
+
|
2139
|
+
<p style="margin-left:22%;">should not be displayed
|
2140
|
+
directly and are not expected to be found in text files.</p>
|
2141
|
+
|
2142
|
+
<p style="margin-left:11%; margin-top: 1em">A
|
2143
|
+
"character set" is simply a description of which
|
2144
|
+
characters are to be considered normal, control, and binary.
|
2145
|
+
The LESSCHARSET environment variable may be used to select a
|
2146
|
+
character set. Possible values for LESSCHARSET are:</p>
|
2147
|
+
|
2148
|
+
<table width="100%" border=0 rules="none" frame="void"
|
2149
|
+
cellspacing="0" cellpadding="0">
|
2150
|
+
<tr valign="top" align="left">
|
2151
|
+
<td width="11%"></td>
|
2152
|
+
<td width="7%">
|
2153
|
+
|
2154
|
+
|
2155
|
+
<p style="margin-top: 1em" valign="top">ascii</p></td>
|
2156
|
+
<td width="4%"></td>
|
2157
|
+
<td width="78%">
|
2158
|
+
|
2159
|
+
|
2160
|
+
<p style="margin-top: 1em" valign="top">BS, TAB, NL, CR,
|
2161
|
+
and formfeed are control characters, all chars with values
|
2162
|
+
between 32 and 126 are normal, and all others are
|
2163
|
+
binary.</p> </td>
|
2164
|
+
</table>
|
2165
|
+
|
2166
|
+
<p style="margin-left:11%;">iso8859</p>
|
2167
|
+
|
2168
|
+
<p style="margin-left:22%;">Selects an ISO 8859 character
|
2169
|
+
set. This is the same as ASCII, except characters between
|
2170
|
+
160 and 255 are treated as normal characters.</p>
|
2171
|
+
|
2172
|
+
<table width="100%" border=0 rules="none" frame="void"
|
2173
|
+
cellspacing="0" cellpadding="0">
|
2174
|
+
<tr valign="top" align="left">
|
2175
|
+
<td width="11%"></td>
|
2176
|
+
<td width="9%">
|
2177
|
+
|
2178
|
+
|
2179
|
+
<p style="margin-top: 1em" valign="top">latin1</p></td>
|
2180
|
+
<td width="2%"></td>
|
2181
|
+
<td width="72%">
|
2182
|
+
|
2183
|
+
|
2184
|
+
<p style="margin-top: 1em" valign="top">Same as
|
2185
|
+
iso8859.</p> </td>
|
2186
|
+
<td width="6%">
|
2187
|
+
</td>
|
2188
|
+
<tr valign="top" align="left">
|
2189
|
+
<td width="11%"></td>
|
2190
|
+
<td width="9%">
|
2191
|
+
|
2192
|
+
|
2193
|
+
<p style="margin-top: 1em" valign="top">latin9</p></td>
|
2194
|
+
<td width="2%"></td>
|
2195
|
+
<td width="72%">
|
2196
|
+
|
2197
|
+
|
2198
|
+
<p style="margin-top: 1em" valign="top">Same as
|
2199
|
+
iso8859.</p> </td>
|
2200
|
+
<td width="6%">
|
2201
|
+
</td>
|
2202
|
+
<tr valign="top" align="left">
|
2203
|
+
<td width="11%"></td>
|
2204
|
+
<td width="9%">
|
2205
|
+
|
2206
|
+
|
2207
|
+
<p style="margin-top: 1em" valign="top">dos</p></td>
|
2208
|
+
<td width="2%"></td>
|
2209
|
+
<td width="72%">
|
2210
|
+
|
2211
|
+
|
2212
|
+
<p style="margin-top: 1em" valign="top">Selects a character
|
2213
|
+
set appropriate for MS-DOS.</p></td>
|
2214
|
+
<td width="6%">
|
2215
|
+
</td>
|
2216
|
+
<tr valign="top" align="left">
|
2217
|
+
<td width="11%"></td>
|
2218
|
+
<td width="9%">
|
2219
|
+
|
2220
|
+
|
2221
|
+
<p style="margin-top: 1em" valign="top">ebcdic</p></td>
|
2222
|
+
<td width="2%"></td>
|
2223
|
+
<td width="72%">
|
2224
|
+
|
2225
|
+
|
2226
|
+
<p style="margin-top: 1em" valign="top">Selects an EBCDIC
|
2227
|
+
character set.</p></td>
|
2228
|
+
<td width="6%">
|
2229
|
+
</td>
|
2230
|
+
</table>
|
2231
|
+
|
2232
|
+
<p style="margin-left:11%;">IBM-1047</p>
|
2233
|
+
|
2234
|
+
<p style="margin-left:22%;">Selects an EBCDIC character set
|
2235
|
+
used by OS/390 Unix Services. This is the EBCDIC analogue of
|
2236
|
+
latin1. You get similar results by setting either
|
2237
|
+
LESSCHARSET=IBM-1047 or LC_CTYPE=en_US in your
|
2238
|
+
environment.</p>
|
2239
|
+
|
2240
|
+
<table width="100%" border=0 rules="none" frame="void"
|
2241
|
+
cellspacing="0" cellpadding="0">
|
2242
|
+
<tr valign="top" align="left">
|
2243
|
+
<td width="11%"></td>
|
2244
|
+
<td width="9%">
|
2245
|
+
|
2246
|
+
|
2247
|
+
<p style="margin-top: 1em" valign="top">koi8-r</p></td>
|
2248
|
+
<td width="2%"></td>
|
2249
|
+
<td width="78%">
|
2250
|
+
|
2251
|
+
|
2252
|
+
<p style="margin-top: 1em" valign="top">Selects a Russian
|
2253
|
+
character set.</p></td>
|
2254
|
+
<tr valign="top" align="left">
|
2255
|
+
<td width="11%"></td>
|
2256
|
+
<td width="9%">
|
2257
|
+
|
2258
|
+
|
2259
|
+
<p style="margin-top: 1em" valign="top">next</p></td>
|
2260
|
+
<td width="2%"></td>
|
2261
|
+
<td width="78%">
|
2262
|
+
|
2263
|
+
|
2264
|
+
<p style="margin-top: 1em" valign="top">Selects a character
|
2265
|
+
set appropriate for NeXT computers.</p></td>
|
2266
|
+
<tr valign="top" align="left">
|
2267
|
+
<td width="11%"></td>
|
2268
|
+
<td width="9%">
|
2269
|
+
|
2270
|
+
|
2271
|
+
<p style="margin-top: 1em" valign="top">utf-8</p></td>
|
2272
|
+
<td width="2%"></td>
|
2273
|
+
<td width="78%">
|
2274
|
+
|
2275
|
+
|
2276
|
+
<p style="margin-top: 1em" valign="top">Selects the UTF-8
|
2277
|
+
encoding of the ISO 10646 character set. UTF-8 is special in
|
2278
|
+
that it supports multi-byte characters in the input file. It
|
2279
|
+
is the only character set that supports multi-byte
|
2280
|
+
characters.</p> </td>
|
2281
|
+
</table>
|
2282
|
+
|
2283
|
+
<p style="margin-left:11%;">windows</p>
|
2284
|
+
|
2285
|
+
<p style="margin-left:22%;">Selects a character set
|
2286
|
+
appropriate for Microsoft Windows (cp 1251).</p>
|
2287
|
+
|
2288
|
+
<p style="margin-left:11%; margin-top: 1em">In rare cases,
|
2289
|
+
it may be desired to tailor <i>less</i> to use a character
|
2290
|
+
set other than the ones definable by LESSCHARSET. In this
|
2291
|
+
case, the environment variable LESSCHARDEF can be used to
|
2292
|
+
define a character set. It should be set to a string where
|
2293
|
+
each character in the string represents one character in the
|
2294
|
+
character set. The character "." is used for a
|
2295
|
+
normal character, "c" for control, and
|
2296
|
+
"b" for binary. A decimal number may be used for
|
2297
|
+
repetition. For example, "bccc4b." would mean
|
2298
|
+
character 0 is binary, 1, 2 and 3 are control, 4, 5, 6 and 7
|
2299
|
+
are binary, and 8 is normal. All characters after the last
|
2300
|
+
are taken to be the same as the last, so characters 9
|
2301
|
+
through 255 would be normal. (This is an example, and does
|
2302
|
+
not necessarily represent any real character set.)</p>
|
2303
|
+
|
2304
|
+
<p style="margin-left:11%; margin-top: 1em">This table
|
2305
|
+
shows the value of LESSCHARDEF which is equivalent to each
|
2306
|
+
of the possible values for LESSCHARSET:</p>
|
2307
|
+
|
2308
|
+
<table width="100%" border=0 rules="none" frame="void"
|
2309
|
+
cellspacing="0" cellpadding="0">
|
2310
|
+
<tr valign="top" align="left">
|
2311
|
+
<td width="18%"></td>
|
2312
|
+
<td width="8%">
|
2313
|
+
|
2314
|
+
|
2315
|
+
<p valign="top">ascii </p></td>
|
2316
|
+
<td width="8%"></td>
|
2317
|
+
<td width="8%">
|
2318
|
+
|
2319
|
+
|
2320
|
+
<p valign="top">8bcccbcc18b95.b</p></td>
|
2321
|
+
<td width="58%">
|
2322
|
+
</td>
|
2323
|
+
<tr valign="top" align="left">
|
2324
|
+
<td width="18%"></td>
|
2325
|
+
<td width="8%">
|
2326
|
+
|
2327
|
+
|
2328
|
+
<p valign="top">dos </p></td>
|
2329
|
+
<td width="8%"></td>
|
2330
|
+
<td width="8%">
|
2331
|
+
|
2332
|
+
|
2333
|
+
<p valign="top">8bcccbcc12bc5b95.b.</p></td>
|
2334
|
+
<td width="58%">
|
2335
|
+
</td>
|
2336
|
+
<tr valign="top" align="left">
|
2337
|
+
<td width="18%"></td>
|
2338
|
+
<td width="8%">
|
2339
|
+
|
2340
|
+
|
2341
|
+
<p valign="top">ebcdic</p></td>
|
2342
|
+
<td width="8%"></td>
|
2343
|
+
<td width="8%">
|
2344
|
+
|
2345
|
+
|
2346
|
+
|
2347
|
+
<p valign="top">5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b</p> </td>
|
2348
|
+
<td width="58%">
|
2349
|
+
</td>
|
2350
|
+
<tr valign="top" align="left">
|
2351
|
+
<td width="18%"></td>
|
2352
|
+
<td width="8%">
|
2353
|
+
|
2354
|
+
|
2355
|
+
<p valign="top"> </p></td>
|
2356
|
+
<td width="8%"></td>
|
2357
|
+
<td width="8%">
|
2358
|
+
|
2359
|
+
|
2360
|
+
<p valign="top">9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b.</p></td>
|
2361
|
+
<td width="58%">
|
2362
|
+
</td>
|
2363
|
+
<tr valign="top" align="left">
|
2364
|
+
<td width="18%"></td>
|
2365
|
+
<td width="8%">
|
2366
|
+
|
2367
|
+
|
2368
|
+
<p valign="top">IBM-1047</p></td>
|
2369
|
+
<td width="8%"></td>
|
2370
|
+
<td width="8%">
|
2371
|
+
|
2372
|
+
|
2373
|
+
|
2374
|
+
<p valign="top">4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc</p> </td>
|
2375
|
+
<td width="58%">
|
2376
|
+
</td>
|
2377
|
+
<tr valign="top" align="left">
|
2378
|
+
<td width="18%"></td>
|
2379
|
+
<td width="8%">
|
2380
|
+
|
2381
|
+
|
2382
|
+
<p valign="top"> </p></td>
|
2383
|
+
<td width="8%"></td>
|
2384
|
+
<td width="8%">
|
2385
|
+
|
2386
|
+
|
2387
|
+
<p valign="top">191.b</p></td>
|
2388
|
+
<td width="58%">
|
2389
|
+
</td>
|
2390
|
+
<tr valign="top" align="left">
|
2391
|
+
<td width="18%"></td>
|
2392
|
+
<td width="8%">
|
2393
|
+
|
2394
|
+
|
2395
|
+
<p valign="top">iso8859</p></td>
|
2396
|
+
<td width="8%"></td>
|
2397
|
+
<td width="8%">
|
2398
|
+
|
2399
|
+
|
2400
|
+
<p valign="top">8bcccbcc18b95.33b.</p></td>
|
2401
|
+
<td width="58%">
|
2402
|
+
</td>
|
2403
|
+
<tr valign="top" align="left">
|
2404
|
+
<td width="18%"></td>
|
2405
|
+
<td width="8%">
|
2406
|
+
|
2407
|
+
|
2408
|
+
<p valign="top">koi8-r</p></td>
|
2409
|
+
<td width="8%"></td>
|
2410
|
+
<td width="8%">
|
2411
|
+
|
2412
|
+
|
2413
|
+
<p valign="top">8bcccbcc18b95.b128.</p></td>
|
2414
|
+
<td width="58%">
|
2415
|
+
</td>
|
2416
|
+
<tr valign="top" align="left">
|
2417
|
+
<td width="18%"></td>
|
2418
|
+
<td width="8%">
|
2419
|
+
|
2420
|
+
|
2421
|
+
<p valign="top">latin1</p></td>
|
2422
|
+
<td width="8%"></td>
|
2423
|
+
<td width="8%">
|
2424
|
+
|
2425
|
+
|
2426
|
+
<p valign="top">8bcccbcc18b95.33b.</p></td>
|
2427
|
+
<td width="58%">
|
2428
|
+
</td>
|
2429
|
+
<tr valign="top" align="left">
|
2430
|
+
<td width="18%"></td>
|
2431
|
+
<td width="8%">
|
2432
|
+
|
2433
|
+
|
2434
|
+
<p valign="top">next </p></td>
|
2435
|
+
<td width="8%"></td>
|
2436
|
+
<td width="8%">
|
2437
|
+
|
2438
|
+
|
2439
|
+
<p valign="top">8bcccbcc18b95.bb125.bb</p></td>
|
2440
|
+
<td width="58%">
|
2441
|
+
</td>
|
2442
|
+
</table>
|
2443
|
+
|
2444
|
+
<p style="margin-left:11%; margin-top: 1em">If neither
|
2445
|
+
LESSCHARSET nor LESSCHARDEF is set, but any of the strings
|
2446
|
+
"UTF-8", "UTF8", "utf-8" or
|
2447
|
+
"utf8" is found in the LC_ALL, LC_TYPE or LANG
|
2448
|
+
environment variables, then the default character set is
|
2449
|
+
utf-8.</p>
|
2450
|
+
|
2451
|
+
<p style="margin-left:11%; margin-top: 1em">If that string
|
2452
|
+
is not found, but your system supports the <i>setlocale</i>
|
2453
|
+
interface, <i>less</i> will use setlocale to determine the
|
2454
|
+
character set. setlocale is controlled by setting the LANG
|
2455
|
+
or LC_CTYPE environment variables.</p>
|
2456
|
+
|
2457
|
+
<p style="margin-left:11%; margin-top: 1em">Finally, if the
|
2458
|
+
<i>setlocale</i> interface is also not available, the
|
2459
|
+
default character set is latin1.</p>
|
2460
|
+
|
2461
|
+
<p style="margin-left:11%; margin-top: 1em">Control and
|
2462
|
+
binary characters are displayed in standout (reverse video).
|
2463
|
+
Each such character is displayed in caret notation if
|
2464
|
+
possible (e.g. ^A for control-A). Caret notation is used
|
2465
|
+
only if inverting the 0100 bit results in a normal printable
|
2466
|
+
character. Otherwise, the character is displayed as a hex
|
2467
|
+
number in angle brackets. This format can be changed by
|
2468
|
+
setting the LESSBINFMT environment variable. LESSBINFMT may
|
2469
|
+
begin with a "*" and one character to select the
|
2470
|
+
display attribute: "*k" is blinking,
|
2471
|
+
"*d" is bold, "*u" is underlined,
|
2472
|
+
"*s" is standout, and "*n" is normal. If
|
2473
|
+
LESSBINFMT does not begin with a "*", normal
|
2474
|
+
attribute is assumed. The remainder of LESSBINFMT is a
|
2475
|
+
string which may include one printf-style escape sequence (a
|
2476
|
+
% followed by x, X, o, d, etc.). For example, if LESSBINFMT
|
2477
|
+
is "*u[%x]", binary characters are displayed in
|
2478
|
+
underlined hexadecimal surrounded by brackets. The default
|
2479
|
+
if no LESSBINFMT is specified is "*s<%X>".
|
2480
|
+
The default if no LESSBINFMT is specified is
|
2481
|
+
"*s<%02X>". Warning: the result of expanding
|
2482
|
+
the character via LESSBINFMT must be less than 31
|
2483
|
+
characters.</p>
|
2484
|
+
|
2485
|
+
<p style="margin-left:11%; margin-top: 1em">When the
|
2486
|
+
character set is utf-8, the LESSUTFBINFMT environment
|
2487
|
+
variable acts similarly to LESSBINFMT but it applies to
|
2488
|
+
Unicode code points that were successfully decoded but are
|
2489
|
+
unsuitable for display (e.g., unassigned code points). Its
|
2490
|
+
default value is "<U+%04lX>". Note that
|
2491
|
+
LESSUTFBINFMT and LESSBINFMT share their display attribute
|
2492
|
+
setting ("*x") so specifying one will affect both;
|
2493
|
+
LESSUTFBINFMT is read after LESSBINFMT so its setting, if
|
2494
|
+
any, will have priority. Problematic octets in a UTF-8 file
|
2495
|
+
(octets of a truncated sequence, octets of a complete but
|
2496
|
+
non-shortest form sequence, illegal octets, and stray
|
2497
|
+
trailing octets) are displayed individually using LESSBINFMT
|
2498
|
+
so as to facilitate diagnostic of how the UTF-8 file is
|
2499
|
+
ill-formed.</p>
|
2500
|
+
|
2501
|
+
<a name="PROMPTS"></a>
|
2502
|
+
<h2>PROMPTS</h2>
|
2503
|
+
|
2504
|
+
|
2505
|
+
<p style="margin-left:11%; margin-top: 1em">The −P
|
2506
|
+
option allows you to tailor the prompt to your preference.
|
2507
|
+
The string given to the −P option replaces the
|
2508
|
+
specified prompt string. Certain characters in the string
|
2509
|
+
are interpreted specially. The prompt mechanism is rather
|
2510
|
+
complicated to provide flexibility, but the ordinary user
|
2511
|
+
need not understand the details of constructing personalized
|
2512
|
+
prompt strings.</p>
|
2513
|
+
|
2514
|
+
<p style="margin-left:11%; margin-top: 1em">A percent sign
|
2515
|
+
followed by a single character is expanded according to what
|
2516
|
+
the following character is:</p>
|
2517
|
+
|
2518
|
+
<table width="100%" border=0 rules="none" frame="void"
|
2519
|
+
cellspacing="0" cellpadding="0">
|
2520
|
+
<tr valign="top" align="left">
|
2521
|
+
<td width="11%"></td>
|
2522
|
+
<td width="4%">
|
2523
|
+
|
2524
|
+
|
2525
|
+
<p style="margin-top: 1em" valign="top">%b<i>X</i></p></td>
|
2526
|
+
<td width="7%"></td>
|
2527
|
+
<td width="78%">
|
2528
|
+
|
2529
|
+
|
2530
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2531
|
+
byte offset into the current input file. The b is followed
|
2532
|
+
by a single character (shown as <i>X</i> above) which
|
2533
|
+
specifies the line whose byte offset is to be used. If the
|
2534
|
+
character is a "t", the byte offset of the top
|
2535
|
+
line in the display is used, an "m" means use the
|
2536
|
+
middle line, a "b" means use the bottom line, a
|
2537
|
+
"B" means use the line just after the bottom line,
|
2538
|
+
and a "j" means use the "target" line,
|
2539
|
+
as specified by the −j option.</p></td>
|
2540
|
+
<tr valign="top" align="left">
|
2541
|
+
<td width="11%"></td>
|
2542
|
+
<td width="4%">
|
2543
|
+
|
2544
|
+
|
2545
|
+
<p style="margin-top: 1em" valign="top">%B</p></td>
|
2546
|
+
<td width="7%"></td>
|
2547
|
+
<td width="78%">
|
2548
|
+
|
2549
|
+
|
2550
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2551
|
+
size of the current input file.</p></td>
|
2552
|
+
<tr valign="top" align="left">
|
2553
|
+
<td width="11%"></td>
|
2554
|
+
<td width="4%">
|
2555
|
+
|
2556
|
+
|
2557
|
+
<p style="margin-top: 1em" valign="top">%c</p></td>
|
2558
|
+
<td width="7%"></td>
|
2559
|
+
<td width="78%">
|
2560
|
+
|
2561
|
+
|
2562
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2563
|
+
column number of the text appearing in the first column of
|
2564
|
+
the screen.</p></td>
|
2565
|
+
<tr valign="top" align="left">
|
2566
|
+
<td width="11%"></td>
|
2567
|
+
<td width="4%">
|
2568
|
+
|
2569
|
+
|
2570
|
+
<p style="margin-top: 1em" valign="top">%d<i>X</i></p></td>
|
2571
|
+
<td width="7%"></td>
|
2572
|
+
<td width="78%">
|
2573
|
+
|
2574
|
+
|
2575
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2576
|
+
page number of a line in the input file. The line to be used
|
2577
|
+
is determined by the <i>X</i>, as with the %b option.</p></td>
|
2578
|
+
<tr valign="top" align="left">
|
2579
|
+
<td width="11%"></td>
|
2580
|
+
<td width="4%">
|
2581
|
+
|
2582
|
+
|
2583
|
+
<p style="margin-top: 1em" valign="top">%D</p></td>
|
2584
|
+
<td width="7%"></td>
|
2585
|
+
<td width="78%">
|
2586
|
+
|
2587
|
+
|
2588
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2589
|
+
number of pages in the input file, or equivalently, the page
|
2590
|
+
number of the last line in the input file.</p></td>
|
2591
|
+
<tr valign="top" align="left">
|
2592
|
+
<td width="11%"></td>
|
2593
|
+
<td width="4%">
|
2594
|
+
|
2595
|
+
|
2596
|
+
<p style="margin-top: 1em" valign="top">%E</p></td>
|
2597
|
+
<td width="7%"></td>
|
2598
|
+
<td width="78%">
|
2599
|
+
|
2600
|
+
|
2601
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2602
|
+
name of the editor (from the VISUAL environment variable, or
|
2603
|
+
the EDITOR environment variable if VISUAL is not defined).
|
2604
|
+
See the discussion of the LESSEDIT feature below.</p></td>
|
2605
|
+
<tr valign="top" align="left">
|
2606
|
+
<td width="11%"></td>
|
2607
|
+
<td width="4%">
|
2608
|
+
|
2609
|
+
|
2610
|
+
<p style="margin-top: 1em" valign="top">%f</p></td>
|
2611
|
+
<td width="7%"></td>
|
2612
|
+
<td width="78%">
|
2613
|
+
|
2614
|
+
|
2615
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2616
|
+
name of the current input file.</p></td>
|
2617
|
+
<tr valign="top" align="left">
|
2618
|
+
<td width="11%"></td>
|
2619
|
+
<td width="4%">
|
2620
|
+
|
2621
|
+
|
2622
|
+
<p style="margin-top: 1em" valign="top">%i</p></td>
|
2623
|
+
<td width="7%"></td>
|
2624
|
+
<td width="78%">
|
2625
|
+
|
2626
|
+
|
2627
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2628
|
+
index of the current file in the list of input files.</p></td>
|
2629
|
+
<tr valign="top" align="left">
|
2630
|
+
<td width="11%"></td>
|
2631
|
+
<td width="4%">
|
2632
|
+
|
2633
|
+
|
2634
|
+
<p style="margin-top: 1em" valign="top">%l<i>X</i></p></td>
|
2635
|
+
<td width="7%"></td>
|
2636
|
+
<td width="78%">
|
2637
|
+
|
2638
|
+
|
2639
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2640
|
+
line number of a line in the input file. The line to be used
|
2641
|
+
is determined by the <i>X</i>, as with the %b option.</p></td>
|
2642
|
+
<tr valign="top" align="left">
|
2643
|
+
<td width="11%"></td>
|
2644
|
+
<td width="4%">
|
2645
|
+
|
2646
|
+
|
2647
|
+
<p style="margin-top: 1em" valign="top">%L</p></td>
|
2648
|
+
<td width="7%"></td>
|
2649
|
+
<td width="78%">
|
2650
|
+
|
2651
|
+
|
2652
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2653
|
+
line number of the last line in the input file.</p></td>
|
2654
|
+
<tr valign="top" align="left">
|
2655
|
+
<td width="11%"></td>
|
2656
|
+
<td width="4%">
|
2657
|
+
|
2658
|
+
|
2659
|
+
<p style="margin-top: 1em" valign="top">%m</p></td>
|
2660
|
+
<td width="7%"></td>
|
2661
|
+
<td width="78%">
|
2662
|
+
|
2663
|
+
|
2664
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2665
|
+
total number of input files.</p></td>
|
2666
|
+
<tr valign="top" align="left">
|
2667
|
+
<td width="11%"></td>
|
2668
|
+
<td width="4%">
|
2669
|
+
|
2670
|
+
|
2671
|
+
<p style="margin-top: 1em" valign="top">%p<i>X</i></p></td>
|
2672
|
+
<td width="7%"></td>
|
2673
|
+
<td width="78%">
|
2674
|
+
|
2675
|
+
|
2676
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2677
|
+
percent into the current input file, based on byte offsets.
|
2678
|
+
The line used is determined by the <i>X</i> as with the %b
|
2679
|
+
option.</p> </td>
|
2680
|
+
<tr valign="top" align="left">
|
2681
|
+
<td width="11%"></td>
|
2682
|
+
<td width="4%">
|
2683
|
+
|
2684
|
+
|
2685
|
+
<p style="margin-top: 1em" valign="top">%P<i>X</i></p></td>
|
2686
|
+
<td width="7%"></td>
|
2687
|
+
<td width="78%">
|
2688
|
+
|
2689
|
+
|
2690
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2691
|
+
percent into the current input file, based on line numbers.
|
2692
|
+
The line used is determined by the <i>X</i> as with the %b
|
2693
|
+
option.</p> </td>
|
2694
|
+
<tr valign="top" align="left">
|
2695
|
+
<td width="11%"></td>
|
2696
|
+
<td width="4%">
|
2697
|
+
|
2698
|
+
|
2699
|
+
<p style="margin-top: 1em" valign="top">%s</p></td>
|
2700
|
+
<td width="7%"></td>
|
2701
|
+
<td width="78%">
|
2702
|
+
|
2703
|
+
|
2704
|
+
<p style="margin-top: 1em" valign="top">Same as %B.</p></td>
|
2705
|
+
<tr valign="top" align="left">
|
2706
|
+
<td width="11%"></td>
|
2707
|
+
<td width="4%">
|
2708
|
+
|
2709
|
+
|
2710
|
+
<p style="margin-top: 1em" valign="top">%t</p></td>
|
2711
|
+
<td width="7%"></td>
|
2712
|
+
<td width="78%">
|
2713
|
+
|
2714
|
+
|
2715
|
+
<p style="margin-top: 1em" valign="top">Causes any trailing
|
2716
|
+
spaces to be removed. Usually used at the end of the string,
|
2717
|
+
but may appear anywhere.</p></td>
|
2718
|
+
<tr valign="top" align="left">
|
2719
|
+
<td width="11%"></td>
|
2720
|
+
<td width="4%">
|
2721
|
+
|
2722
|
+
|
2723
|
+
<p style="margin-top: 1em" valign="top">%x</p></td>
|
2724
|
+
<td width="7%"></td>
|
2725
|
+
<td width="78%">
|
2726
|
+
|
2727
|
+
|
2728
|
+
<p style="margin-top: 1em" valign="top">Replaced by the
|
2729
|
+
name of the next input file in the list.</p></td>
|
2730
|
+
</table>
|
2731
|
+
|
2732
|
+
<p style="margin-left:11%; margin-top: 1em">If any item is
|
2733
|
+
unknown (for example, the file size if input is a pipe), a
|
2734
|
+
question mark is printed instead.</p>
|
2735
|
+
|
2736
|
+
<p style="margin-left:11%; margin-top: 1em">The format of
|
2737
|
+
the prompt string can be changed depending on certain
|
2738
|
+
conditions. A question mark followed by a single character
|
2739
|
+
acts like an "IF": depending on the following
|
2740
|
+
character, a condition is evaluated. If the condition is
|
2741
|
+
true, any characters following the question mark and
|
2742
|
+
condition character, up to a period, are included in the
|
2743
|
+
prompt. If the condition is false, such characters are not
|
2744
|
+
included. A colon appearing between the question mark and
|
2745
|
+
the period can be used to establish an "ELSE": any
|
2746
|
+
characters between the colon and the period are included in
|
2747
|
+
the string if and only if the IF condition is false.
|
2748
|
+
Condition characters (which follow a question mark) may
|
2749
|
+
be:</p>
|
2750
|
+
|
2751
|
+
<table width="100%" border=0 rules="none" frame="void"
|
2752
|
+
cellspacing="0" cellpadding="0">
|
2753
|
+
<tr valign="top" align="left">
|
2754
|
+
<td width="11%"></td>
|
2755
|
+
<td width="4%">
|
2756
|
+
|
2757
|
+
|
2758
|
+
<p style="margin-top: 1em" valign="top">?a</p></td>
|
2759
|
+
<td width="7%"></td>
|
2760
|
+
<td width="78%">
|
2761
|
+
|
2762
|
+
|
2763
|
+
<p style="margin-top: 1em" valign="top">True if any
|
2764
|
+
characters have been included in the prompt so far.</p></td>
|
2765
|
+
<tr valign="top" align="left">
|
2766
|
+
<td width="11%"></td>
|
2767
|
+
<td width="4%">
|
2768
|
+
|
2769
|
+
|
2770
|
+
<p style="margin-top: 1em" valign="top">?b<i>X</i></p></td>
|
2771
|
+
<td width="7%"></td>
|
2772
|
+
<td width="78%">
|
2773
|
+
|
2774
|
+
|
2775
|
+
<p style="margin-top: 1em" valign="top">True if the byte
|
2776
|
+
offset of the specified line is known.</p></td>
|
2777
|
+
<tr valign="top" align="left">
|
2778
|
+
<td width="11%"></td>
|
2779
|
+
<td width="4%">
|
2780
|
+
|
2781
|
+
|
2782
|
+
<p style="margin-top: 1em" valign="top">?B</p></td>
|
2783
|
+
<td width="7%"></td>
|
2784
|
+
<td width="78%">
|
2785
|
+
|
2786
|
+
|
2787
|
+
<p style="margin-top: 1em" valign="top">True if the size of
|
2788
|
+
current input file is known.</p></td>
|
2789
|
+
<tr valign="top" align="left">
|
2790
|
+
<td width="11%"></td>
|
2791
|
+
<td width="4%">
|
2792
|
+
|
2793
|
+
|
2794
|
+
<p style="margin-top: 1em" valign="top">?c</p></td>
|
2795
|
+
<td width="7%"></td>
|
2796
|
+
<td width="78%">
|
2797
|
+
|
2798
|
+
|
2799
|
+
<p style="margin-top: 1em" valign="top">True if the text is
|
2800
|
+
horizontally shifted (%c is not zero).</p></td>
|
2801
|
+
<tr valign="top" align="left">
|
2802
|
+
<td width="11%"></td>
|
2803
|
+
<td width="4%">
|
2804
|
+
|
2805
|
+
|
2806
|
+
<p style="margin-top: 1em" valign="top">?d<i>X</i></p></td>
|
2807
|
+
<td width="7%"></td>
|
2808
|
+
<td width="78%">
|
2809
|
+
|
2810
|
+
|
2811
|
+
<p style="margin-top: 1em" valign="top">True if the page
|
2812
|
+
number of the specified line is known.</p></td>
|
2813
|
+
<tr valign="top" align="left">
|
2814
|
+
<td width="11%"></td>
|
2815
|
+
<td width="4%">
|
2816
|
+
|
2817
|
+
|
2818
|
+
<p style="margin-top: 1em" valign="top">?e</p></td>
|
2819
|
+
<td width="7%"></td>
|
2820
|
+
<td width="78%">
|
2821
|
+
|
2822
|
+
|
2823
|
+
<p style="margin-top: 1em" valign="top">True if at
|
2824
|
+
end-of-file.</p> </td>
|
2825
|
+
<tr valign="top" align="left">
|
2826
|
+
<td width="11%"></td>
|
2827
|
+
<td width="4%">
|
2828
|
+
|
2829
|
+
|
2830
|
+
<p style="margin-top: 1em" valign="top">?f</p></td>
|
2831
|
+
<td width="7%"></td>
|
2832
|
+
<td width="78%">
|
2833
|
+
|
2834
|
+
|
2835
|
+
<p style="margin-top: 1em" valign="top">True if there is an
|
2836
|
+
input filename (that is, if input is not a pipe).</p></td>
|
2837
|
+
<tr valign="top" align="left">
|
2838
|
+
<td width="11%"></td>
|
2839
|
+
<td width="4%">
|
2840
|
+
|
2841
|
+
|
2842
|
+
<p style="margin-top: 1em" valign="top">?l<i>X</i></p></td>
|
2843
|
+
<td width="7%"></td>
|
2844
|
+
<td width="78%">
|
2845
|
+
|
2846
|
+
|
2847
|
+
<p style="margin-top: 1em" valign="top">True if the line
|
2848
|
+
number of the specified line is known.</p></td>
|
2849
|
+
<tr valign="top" align="left">
|
2850
|
+
<td width="11%"></td>
|
2851
|
+
<td width="4%">
|
2852
|
+
|
2853
|
+
|
2854
|
+
<p style="margin-top: 1em" valign="top">?L</p></td>
|
2855
|
+
<td width="7%"></td>
|
2856
|
+
<td width="78%">
|
2857
|
+
|
2858
|
+
|
2859
|
+
<p style="margin-top: 1em" valign="top">True if the line
|
2860
|
+
number of the last line in the file is known.</p></td>
|
2861
|
+
<tr valign="top" align="left">
|
2862
|
+
<td width="11%"></td>
|
2863
|
+
<td width="4%">
|
2864
|
+
|
2865
|
+
|
2866
|
+
<p style="margin-top: 1em" valign="top">?m</p></td>
|
2867
|
+
<td width="7%"></td>
|
2868
|
+
<td width="78%">
|
2869
|
+
|
2870
|
+
|
2871
|
+
<p style="margin-top: 1em" valign="top">True if there is
|
2872
|
+
more than one input file.</p></td>
|
2873
|
+
<tr valign="top" align="left">
|
2874
|
+
<td width="11%"></td>
|
2875
|
+
<td width="4%">
|
2876
|
+
|
2877
|
+
|
2878
|
+
<p style="margin-top: 1em" valign="top">?n</p></td>
|
2879
|
+
<td width="7%"></td>
|
2880
|
+
<td width="78%">
|
2881
|
+
|
2882
|
+
|
2883
|
+
<p style="margin-top: 1em" valign="top">True if this is the
|
2884
|
+
first prompt in a new input file.</p></td>
|
2885
|
+
<tr valign="top" align="left">
|
2886
|
+
<td width="11%"></td>
|
2887
|
+
<td width="4%">
|
2888
|
+
|
2889
|
+
|
2890
|
+
<p style="margin-top: 1em" valign="top">?p<i>X</i></p></td>
|
2891
|
+
<td width="7%"></td>
|
2892
|
+
<td width="78%">
|
2893
|
+
|
2894
|
+
|
2895
|
+
<p style="margin-top: 1em" valign="top">True if the percent
|
2896
|
+
into the current input file, based on byte offsets, of the
|
2897
|
+
specified line is known.</p></td>
|
2898
|
+
<tr valign="top" align="left">
|
2899
|
+
<td width="11%"></td>
|
2900
|
+
<td width="4%">
|
2901
|
+
|
2902
|
+
|
2903
|
+
<p style="margin-top: 1em" valign="top">?P<i>X</i></p></td>
|
2904
|
+
<td width="7%"></td>
|
2905
|
+
<td width="78%">
|
2906
|
+
|
2907
|
+
|
2908
|
+
<p style="margin-top: 1em" valign="top">True if the percent
|
2909
|
+
into the current input file, based on line numbers, of the
|
2910
|
+
specified line is known.</p></td>
|
2911
|
+
<tr valign="top" align="left">
|
2912
|
+
<td width="11%"></td>
|
2913
|
+
<td width="4%">
|
2914
|
+
|
2915
|
+
|
2916
|
+
<p style="margin-top: 1em" valign="top">?s</p></td>
|
2917
|
+
<td width="7%"></td>
|
2918
|
+
<td width="78%">
|
2919
|
+
|
2920
|
+
|
2921
|
+
<p style="margin-top: 1em" valign="top">Same as
|
2922
|
+
"?B".</p> </td>
|
2923
|
+
<tr valign="top" align="left">
|
2924
|
+
<td width="11%"></td>
|
2925
|
+
<td width="4%">
|
2926
|
+
|
2927
|
+
|
2928
|
+
<p style="margin-top: 1em" valign="top">?x</p></td>
|
2929
|
+
<td width="7%"></td>
|
2930
|
+
<td width="78%">
|
2931
|
+
|
2932
|
+
|
2933
|
+
<p style="margin-top: 1em" valign="top">True if there is a
|
2934
|
+
next input file (that is, if the current input file is not
|
2935
|
+
the last one).</p></td>
|
2936
|
+
</table>
|
2937
|
+
|
2938
|
+
<p style="margin-left:11%; margin-top: 1em">Any characters
|
2939
|
+
other than the special ones (question mark, colon, period,
|
2940
|
+
percent, and backslash) become literally part of the prompt.
|
2941
|
+
Any of the special characters may be included in the prompt
|
2942
|
+
literally by preceding it with a backslash.</p>
|
2943
|
+
|
2944
|
+
<p style="margin-left:11%; margin-top: 1em">Some
|
2945
|
+
examples:</p>
|
2946
|
+
|
2947
|
+
<p style="margin-left:11%; margin-top: 1em">?f%f:Standard
|
2948
|
+
input.</p>
|
2949
|
+
|
2950
|
+
<p style="margin-left:11%; margin-top: 1em">This prompt
|
2951
|
+
prints the filename, if known; otherwise the string
|
2952
|
+
"Standard input".</p>
|
2953
|
+
|
2954
|
+
<p style="margin-left:11%; margin-top: 1em">?f%f .?ltLine
|
2955
|
+
%lt:?pt%pt\%:?btByte %bt:-...</p>
|
2956
|
+
|
2957
|
+
<p style="margin-left:11%; margin-top: 1em">This prompt
|
2958
|
+
would print the filename, if known. The filename is followed
|
2959
|
+
by the line number, if known, otherwise the percent if
|
2960
|
+
known, otherwise the byte offset if known. Otherwise, a dash
|
2961
|
+
is printed. Notice how each question mark has a matching
|
2962
|
+
period, and how the % after the %pt is included literally by
|
2963
|
+
escaping it with a backslash.</p>
|
2964
|
+
|
2965
|
+
|
2966
|
+
<p style="margin-left:11%; margin-top: 1em">?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x..%t</p>
|
2967
|
+
|
2968
|
+
<p style="margin-left:11%; margin-top: 1em">This prints the
|
2969
|
+
filename if this is the first prompt in a file, followed by
|
2970
|
+
the "file N of N" message if there is more than
|
2971
|
+
one input file. Then, if we are at end-of-file, the string
|
2972
|
+
"(END)" is printed followed by the name of the
|
2973
|
+
next file, if there is one. Finally, any trailing spaces are
|
2974
|
+
truncated. This is the default prompt. For reference, here
|
2975
|
+
are the defaults for the other two prompts (−m and
|
2976
|
+
−M respectively). Each is broken into two lines here
|
2977
|
+
for readability only.</p>
|
2978
|
+
|
2979
|
+
|
2980
|
+
<p style="margin-left:11%; margin-top: 1em">?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x.:</p>
|
2981
|
+
|
2982
|
+
<table width="100%" border=0 rules="none" frame="void"
|
2983
|
+
cellspacing="0" cellpadding="0">
|
2984
|
+
<tr valign="top" align="left">
|
2985
|
+
<td width="18%"></td>
|
2986
|
+
<td width="82%">
|
2987
|
+
|
2988
|
+
|
2989
|
+
<p valign="top">?pB%pB\%:byte %bB?s/%s...%t</p></td>
|
2990
|
+
</table>
|
2991
|
+
|
2992
|
+
|
2993
|
+
<p style="margin-left:11%; margin-top: 1em">?f%f .?n?m(file %i of %m) ..?ltlines %lt-%lb?L/%L. :</p>
|
2994
|
+
|
2995
|
+
<table width="100%" border=0 rules="none" frame="void"
|
2996
|
+
cellspacing="0" cellpadding="0">
|
2997
|
+
<tr valign="top" align="left">
|
2998
|
+
<td width="18%"></td>
|
2999
|
+
<td width="82%">
|
3000
|
+
|
3001
|
+
|
3002
|
+
|
3003
|
+
<p valign="top">byte %bB?s/%s. .?e(END) ?x- Next\: %x.:?pB%pB\%..%t</p> </td>
|
3004
|
+
</table>
|
3005
|
+
|
3006
|
+
<p style="margin-left:11%; margin-top: 1em">And here is the
|
3007
|
+
default message produced by the = command:</p>
|
3008
|
+
|
3009
|
+
|
3010
|
+
<p style="margin-left:11%; margin-top: 1em">?f%f .?m(file %i of %m) .?ltlines %lt-%lb?L/%L. .</p>
|
3011
|
+
|
3012
|
+
<table width="100%" border=0 rules="none" frame="void"
|
3013
|
+
cellspacing="0" cellpadding="0">
|
3014
|
+
<tr valign="top" align="left">
|
3015
|
+
<td width="18%"></td>
|
3016
|
+
<td width="82%">
|
3017
|
+
|
3018
|
+
|
3019
|
+
|
3020
|
+
<p valign="top">byte %bB?s/%s. ?e(END) :?pB%pB\%..%t</p> </td>
|
3021
|
+
</table>
|
3022
|
+
|
3023
|
+
<p style="margin-left:11%; margin-top: 1em">The prompt
|
3024
|
+
expansion features are also used for another purpose: if an
|
3025
|
+
environment variable LESSEDIT is defined, it is used as the
|
3026
|
+
command to be executed when the v command is invoked. The
|
3027
|
+
LESSEDIT string is expanded in the same way as the prompt
|
3028
|
+
strings. The default value for LESSEDIT is:</p>
|
3029
|
+
|
3030
|
+
<table width="100%" border=0 rules="none" frame="void"
|
3031
|
+
cellspacing="0" cellpadding="0">
|
3032
|
+
<tr valign="top" align="left">
|
3033
|
+
<td width="18%"></td>
|
3034
|
+
<td width="82%">
|
3035
|
+
|
3036
|
+
|
3037
|
+
<p valign="top">%E ?lm+%lm. %f</p></td>
|
3038
|
+
</table>
|
3039
|
+
|
3040
|
+
<p style="margin-left:11%; margin-top: 1em">Note that this
|
3041
|
+
expands to the editor name, followed by a + and the line
|
3042
|
+
number, followed by the file name. If your editor does not
|
3043
|
+
accept the "+linenumber" syntax, or has other
|
3044
|
+
differences in invocation syntax, the LESSEDIT variable can
|
3045
|
+
be changed to modify this default.</p>
|
3046
|
+
|
3047
|
+
<a name="SECURITY"></a>
|
3048
|
+
<h2>SECURITY</h2>
|
3049
|
+
|
3050
|
+
|
3051
|
+
<p style="margin-left:11%; margin-top: 1em">When the
|
3052
|
+
environment variable LESSSECURE is set to 1, <i>less</i>
|
3053
|
+
runs in a "secure" mode. This means these features
|
3054
|
+
are disabled:</p>
|
3055
|
+
|
3056
|
+
<table width="100%" border=0 rules="none" frame="void"
|
3057
|
+
cellspacing="0" cellpadding="0">
|
3058
|
+
<tr valign="top" align="left">
|
3059
|
+
<td width="22%"></td>
|
3060
|
+
<td width="7%">
|
3061
|
+
|
3062
|
+
|
3063
|
+
<p style="margin-top: 1em" valign="top">!</p></td>
|
3064
|
+
<td width="3%"></td>
|
3065
|
+
<td width="31%">
|
3066
|
+
|
3067
|
+
|
3068
|
+
<p style="margin-top: 1em" valign="top">the shell
|
3069
|
+
command</p> </td>
|
3070
|
+
<td width="37%">
|
3071
|
+
</td>
|
3072
|
+
<tr valign="top" align="left">
|
3073
|
+
<td width="22%"></td>
|
3074
|
+
<td width="7%">
|
3075
|
+
|
3076
|
+
|
3077
|
+
<p style="margin-top: 1em" valign="top">|</p></td>
|
3078
|
+
<td width="3%"></td>
|
3079
|
+
<td width="31%">
|
3080
|
+
|
3081
|
+
|
3082
|
+
<p style="margin-top: 1em" valign="top">the pipe
|
3083
|
+
command</p> </td>
|
3084
|
+
<td width="37%">
|
3085
|
+
</td>
|
3086
|
+
<tr valign="top" align="left">
|
3087
|
+
<td width="22%"></td>
|
3088
|
+
<td width="7%">
|
3089
|
+
|
3090
|
+
|
3091
|
+
<p style="margin-top: 1em" valign="top">:e</p></td>
|
3092
|
+
<td width="3%"></td>
|
3093
|
+
<td width="31%">
|
3094
|
+
|
3095
|
+
|
3096
|
+
<p style="margin-top: 1em" valign="top">the examine
|
3097
|
+
command.</p> </td>
|
3098
|
+
<td width="37%">
|
3099
|
+
</td>
|
3100
|
+
<tr valign="top" align="left">
|
3101
|
+
<td width="22%"></td>
|
3102
|
+
<td width="7%">
|
3103
|
+
|
3104
|
+
|
3105
|
+
<p style="margin-top: 1em" valign="top">v</p></td>
|
3106
|
+
<td width="3%"></td>
|
3107
|
+
<td width="31%">
|
3108
|
+
|
3109
|
+
|
3110
|
+
<p style="margin-top: 1em" valign="top">the editing
|
3111
|
+
command</p> </td>
|
3112
|
+
<td width="37%">
|
3113
|
+
</td>
|
3114
|
+
<tr valign="top" align="left">
|
3115
|
+
<td width="22%"></td>
|
3116
|
+
<td width="7%">
|
3117
|
+
|
3118
|
+
|
3119
|
+
<p style="margin-top: 1em" valign="top">s −o</p></td>
|
3120
|
+
<td width="3%"></td>
|
3121
|
+
<td width="31%">
|
3122
|
+
|
3123
|
+
|
3124
|
+
<p style="margin-top: 1em" valign="top">log files</p></td>
|
3125
|
+
<td width="37%">
|
3126
|
+
</td>
|
3127
|
+
<tr valign="top" align="left">
|
3128
|
+
<td width="22%"></td>
|
3129
|
+
<td width="7%">
|
3130
|
+
|
3131
|
+
|
3132
|
+
<p style="margin-top: 1em" valign="top">−k</p></td>
|
3133
|
+
<td width="3%"></td>
|
3134
|
+
<td width="31%">
|
3135
|
+
|
3136
|
+
|
3137
|
+
<p style="margin-top: 1em" valign="top">use of lesskey
|
3138
|
+
files</p> </td>
|
3139
|
+
<td width="37%">
|
3140
|
+
</td>
|
3141
|
+
<tr valign="top" align="left">
|
3142
|
+
<td width="22%"></td>
|
3143
|
+
<td width="7%">
|
3144
|
+
|
3145
|
+
|
3146
|
+
<p style="margin-top: 1em" valign="top">−t</p></td>
|
3147
|
+
<td width="3%"></td>
|
3148
|
+
<td width="31%">
|
3149
|
+
|
3150
|
+
|
3151
|
+
<p style="margin-top: 1em" valign="top">use of tags
|
3152
|
+
files</p> </td>
|
3153
|
+
<td width="37%">
|
3154
|
+
</td>
|
3155
|
+
</table>
|
3156
|
+
|
3157
|
+
<p style="margin-left:22%; margin-top: 1em">metacharacters
|
3158
|
+
in filenames, such as *</p>
|
3159
|
+
|
3160
|
+
<table width="100%" border=0 rules="none" frame="void"
|
3161
|
+
cellspacing="0" cellpadding="0">
|
3162
|
+
<tr valign="top" align="left">
|
3163
|
+
<td width="32%"></td>
|
3164
|
+
<td width="45%"></td>
|
3165
|
+
<td width="23%">
|
3166
|
+
</td>
|
3167
|
+
<tr valign="top" align="left">
|
3168
|
+
<td width="32%"></td>
|
3169
|
+
<td width="45%">
|
3170
|
+
|
3171
|
+
|
3172
|
+
<p valign="top">filename completion (TAB, ^L)</p></td>
|
3173
|
+
<td width="23%">
|
3174
|
+
</td>
|
3175
|
+
</table>
|
3176
|
+
|
3177
|
+
<p style="margin-left:11%; margin-top: 1em">Less can also
|
3178
|
+
be compiled to be permanently in "secure"
|
3179
|
+
mode.</p>
|
3180
|
+
|
3181
|
+
<a name="COMPATIBILITY WITH MORE"></a>
|
3182
|
+
<h2>COMPATIBILITY WITH MORE</h2>
|
3183
|
+
|
3184
|
+
|
3185
|
+
<p style="margin-left:11%; margin-top: 1em">If the
|
3186
|
+
environment variable LESS_IS_MORE is set to 1, or if the
|
3187
|
+
program is invoked via a file link named "more",
|
3188
|
+
<i>less</i> behaves (mostly) in conformance with the POSIX
|
3189
|
+
"more" command specification. In this mode, less
|
3190
|
+
behaves differently in these ways:</p>
|
3191
|
+
|
3192
|
+
<p style="margin-left:11%; margin-top: 1em">The −e
|
3193
|
+
option works differently. If the −e option is not set,
|
3194
|
+
<i>less</i> behaves as if the −E option were set. If
|
3195
|
+
the −e option is set, <i>less</i> behaves as if the
|
3196
|
+
−e and −F options were set.</p>
|
3197
|
+
|
3198
|
+
<p style="margin-left:11%; margin-top: 1em">The −m
|
3199
|
+
option works differently. If the −m option is not set,
|
3200
|
+
the medium prompt is used, and it is prefixed with the
|
3201
|
+
string "--More--". If the −m option is set,
|
3202
|
+
the short prompt is used.</p>
|
3203
|
+
|
3204
|
+
<p style="margin-left:11%; margin-top: 1em">The −n
|
3205
|
+
option acts like the −z option. The normal behavior of
|
3206
|
+
the −n option is unavailable in this mode.</p>
|
3207
|
+
|
3208
|
+
<p style="margin-left:11%; margin-top: 1em">The parameter
|
3209
|
+
to the −p option is taken to be a <i>less</i> command
|
3210
|
+
rather than a search pattern.</p>
|
3211
|
+
|
3212
|
+
<p style="margin-left:11%; margin-top: 1em">The LESS
|
3213
|
+
environment variable is ignored, and the MORE environment
|
3214
|
+
variable is used in its place.</p>
|
3215
|
+
|
3216
|
+
<a name="ENVIRONMENT VARIABLES"></a>
|
3217
|
+
<h2>ENVIRONMENT VARIABLES</h2>
|
3218
|
+
|
3219
|
+
|
3220
|
+
<p style="margin-left:11%; margin-top: 1em">Environment
|
3221
|
+
variables may be specified either in the system environment
|
3222
|
+
as usual, or in a <i>lesskey</i> (1) file. If environment
|
3223
|
+
variables are defined in more than one place, variables
|
3224
|
+
defined in a local lesskey file take precedence over
|
3225
|
+
variables defined in the system environment, which take
|
3226
|
+
precedence over variables defined in the system-wide lesskey
|
3227
|
+
file. <br>
|
3228
|
+
COLUMNS</p>
|
3229
|
+
|
3230
|
+
<p style="margin-left:22%;">Sets the number of columns on
|
3231
|
+
the screen. Takes precedence over the number of columns
|
3232
|
+
specified by the TERM variable. (But if you have a windowing
|
3233
|
+
system which supports TIOCGWINSZ or WIOCGETD, the window
|
3234
|
+
system’s idea of the screen size takes precedence over
|
3235
|
+
the LINES and COLUMNS environment variables.)</p>
|
3236
|
+
|
3237
|
+
<table width="100%" border=0 rules="none" frame="void"
|
3238
|
+
cellspacing="0" cellpadding="0">
|
3239
|
+
<tr valign="top" align="left">
|
3240
|
+
<td width="11%"></td>
|
3241
|
+
<td width="9%">
|
3242
|
+
|
3243
|
+
|
3244
|
+
<p style="margin-top: 1em" valign="top">EDITOR</p></td>
|
3245
|
+
<td width="2%"></td>
|
3246
|
+
<td width="78%">
|
3247
|
+
|
3248
|
+
|
3249
|
+
<p style="margin-top: 1em" valign="top">The name of the
|
3250
|
+
editor (used for the v command).</p></td>
|
3251
|
+
<tr valign="top" align="left">
|
3252
|
+
<td width="11%"></td>
|
3253
|
+
<td width="9%">
|
3254
|
+
|
3255
|
+
|
3256
|
+
<p style="margin-top: 1em" valign="top">HOME</p></td>
|
3257
|
+
<td width="2%"></td>
|
3258
|
+
<td width="78%">
|
3259
|
+
|
3260
|
+
|
3261
|
+
<p style="margin-top: 1em" valign="top">Name of the
|
3262
|
+
user’s home directory (used to find a lesskey file on
|
3263
|
+
Unix and OS/2 systems).</p></td>
|
3264
|
+
</table>
|
3265
|
+
|
3266
|
+
<p style="margin-left:11%;">HOMEDRIVE, HOMEPATH</p>
|
3267
|
+
|
3268
|
+
<p style="margin-left:22%;">Concatenation of the HOMEDRIVE
|
3269
|
+
and HOMEPATH environment variables is the name of the
|
3270
|
+
user’s home directory if the HOME variable is not set
|
3271
|
+
(only in the Windows version).</p>
|
3272
|
+
|
3273
|
+
<table width="100%" border=0 rules="none" frame="void"
|
3274
|
+
cellspacing="0" cellpadding="0">
|
3275
|
+
<tr valign="top" align="left">
|
3276
|
+
<td width="11%"></td>
|
3277
|
+
<td width="6%">
|
3278
|
+
|
3279
|
+
|
3280
|
+
<p style="margin-top: 1em" valign="top">INIT</p></td>
|
3281
|
+
<td width="5%"></td>
|
3282
|
+
<td width="78%">
|
3283
|
+
|
3284
|
+
|
3285
|
+
<p style="margin-top: 1em" valign="top">Name of the
|
3286
|
+
user’s init directory (used to find a lesskey file on
|
3287
|
+
OS/2 systems).</p></td>
|
3288
|
+
<tr valign="top" align="left">
|
3289
|
+
<td width="11%"></td>
|
3290
|
+
<td width="6%">
|
3291
|
+
|
3292
|
+
|
3293
|
+
<p style="margin-top: 1em" valign="top">LANG</p></td>
|
3294
|
+
<td width="5%"></td>
|
3295
|
+
<td width="78%">
|
3296
|
+
|
3297
|
+
|
3298
|
+
<p style="margin-top: 1em" valign="top">Language for
|
3299
|
+
determining the character set.</p></td>
|
3300
|
+
</table>
|
3301
|
+
|
3302
|
+
<p style="margin-left:11%;">LC_CTYPE</p>
|
3303
|
+
|
3304
|
+
<p style="margin-left:22%;">Language for determining the
|
3305
|
+
character set.</p>
|
3306
|
+
|
3307
|
+
<table width="100%" border=0 rules="none" frame="void"
|
3308
|
+
cellspacing="0" cellpadding="0">
|
3309
|
+
<tr valign="top" align="left">
|
3310
|
+
<td width="11%"></td>
|
3311
|
+
<td width="6%">
|
3312
|
+
|
3313
|
+
|
3314
|
+
<p style="margin-top: 1em" valign="top">LESS</p></td>
|
3315
|
+
<td width="5%"></td>
|
3316
|
+
<td width="72%">
|
3317
|
+
|
3318
|
+
|
3319
|
+
<p style="margin-top: 1em" valign="top">Options which are
|
3320
|
+
passed to <i>less</i> automatically.</p></td>
|
3321
|
+
<td width="6%">
|
3322
|
+
</td>
|
3323
|
+
</table>
|
3324
|
+
|
3325
|
+
<p style="margin-left:11%;">LESSANSIENDCHARS</p>
|
3326
|
+
|
3327
|
+
<p style="margin-left:22%;">Characters which may end an
|
3328
|
+
ANSI color escape sequence (default "m").</p>
|
3329
|
+
|
3330
|
+
<p style="margin-left:11%;">LESSANSIMIDCHARS</p>
|
3331
|
+
|
3332
|
+
<p style="margin-left:22%;">Characters which may appear
|
3333
|
+
between the ESC character and the end character in an ANSI
|
3334
|
+
color escape sequence (default
|
3335
|
+
"0123456789;[?!"’#%()*+ ".</p>
|
3336
|
+
|
3337
|
+
<p style="margin-left:11%;">LESSBINFMT</p>
|
3338
|
+
|
3339
|
+
<p style="margin-left:22%;">Format for displaying
|
3340
|
+
non-printable, non-control characters.</p>
|
3341
|
+
|
3342
|
+
<p style="margin-left:11%;">LESSCHARDEF</p>
|
3343
|
+
|
3344
|
+
<p style="margin-left:22%;">Defines a character set.</p>
|
3345
|
+
|
3346
|
+
<p style="margin-left:11%;">LESSCHARSET</p>
|
3347
|
+
|
3348
|
+
<p style="margin-left:22%;">Selects a predefined character
|
3349
|
+
set.</p>
|
3350
|
+
|
3351
|
+
<p style="margin-left:11%;">LESSCLOSE</p>
|
3352
|
+
|
3353
|
+
<p style="margin-left:22%;">Command line to invoke the
|
3354
|
+
(optional) input-postprocessor.</p>
|
3355
|
+
|
3356
|
+
<p style="margin-left:11%;">LESSECHO</p>
|
3357
|
+
|
3358
|
+
<p style="margin-left:22%;">Name of the lessecho program
|
3359
|
+
(default "lessecho"). The lessecho program is
|
3360
|
+
needed to expand metacharacters, such as * and ?, in
|
3361
|
+
filenames on Unix systems.</p>
|
3362
|
+
|
3363
|
+
<p style="margin-left:11%;">LESSEDIT</p>
|
3364
|
+
|
3365
|
+
<p style="margin-left:22%;">Editor prototype string (used
|
3366
|
+
for the v command). See discussion under PROMPTS.</p>
|
3367
|
+
|
3368
|
+
<p style="margin-left:11%;">LESSGLOBALTAGS</p>
|
3369
|
+
|
3370
|
+
<p style="margin-left:22%;">Name of the command used by the
|
3371
|
+
−t option to find global tags. Normally should be set
|
3372
|
+
to "global" if your system has the <i>global</i>
|
3373
|
+
(1) command. If not set, global tags are not used.</p>
|
3374
|
+
|
3375
|
+
<p style="margin-left:11%;">LESSHISTFILE</p>
|
3376
|
+
|
3377
|
+
<p style="margin-left:22%;">Name of the history file used
|
3378
|
+
to remember search commands and shell commands between
|
3379
|
+
invocations of <i>less.</i> If set to "−" or
|
3380
|
+
"/dev/null", a history file is not used. The
|
3381
|
+
default is "$HOME/.lesshst" on Unix systems,
|
3382
|
+
"$HOME/_lesshst" on DOS and Windows systems, or
|
3383
|
+
"$HOME/lesshst.ini" or
|
3384
|
+
"$INIT/lesshst.ini" on OS/2 systems.</p>
|
3385
|
+
|
3386
|
+
<p style="margin-left:11%;">LESSHISTSIZE</p>
|
3387
|
+
|
3388
|
+
<p style="margin-left:22%;">The maximum number of commands
|
3389
|
+
to save in the history file. The default is 100.</p>
|
3390
|
+
|
3391
|
+
<p style="margin-left:11%;">LESSKEY</p>
|
3392
|
+
|
3393
|
+
<p style="margin-left:22%;">Name of the default lesskey(1)
|
3394
|
+
file.</p>
|
3395
|
+
|
3396
|
+
<p style="margin-left:11%;">LESSKEY_SYSTEM</p>
|
3397
|
+
|
3398
|
+
<p style="margin-left:22%;">Name of the default system-wide
|
3399
|
+
lesskey(1) file.</p>
|
3400
|
+
|
3401
|
+
<p style="margin-left:11%;">LESSMETACHARS</p>
|
3402
|
+
|
3403
|
+
<p style="margin-left:22%;">List of characters which are
|
3404
|
+
considered "metacharacters" by the shell.</p>
|
3405
|
+
|
3406
|
+
<p style="margin-left:11%;">LESSMETAESCAPE</p>
|
3407
|
+
|
3408
|
+
<p style="margin-left:22%;">Prefix which less will add
|
3409
|
+
before each metacharacter in a command sent to the shell. If
|
3410
|
+
LESSMETAESCAPE is an empty string, commands containing
|
3411
|
+
metacharacters will not be passed to the shell.</p>
|
3412
|
+
|
3413
|
+
<p style="margin-left:11%;">LESSOPEN</p>
|
3414
|
+
|
3415
|
+
<p style="margin-left:22%;">Command line to invoke the
|
3416
|
+
(optional) input-preprocessor.</p>
|
3417
|
+
|
3418
|
+
<p style="margin-left:11%;">LESSSECURE</p>
|
3419
|
+
|
3420
|
+
<p style="margin-left:22%;">Runs less in "secure"
|
3421
|
+
mode. See discussion under SECURITY.</p>
|
3422
|
+
|
3423
|
+
<p style="margin-left:11%;">LESSSEPARATOR</p>
|
3424
|
+
|
3425
|
+
<p style="margin-left:22%;">String to be appended to a
|
3426
|
+
directory name in filename completion.</p>
|
3427
|
+
|
3428
|
+
<p style="margin-left:11%;">LESSUTFBINFMT</p>
|
3429
|
+
|
3430
|
+
<p style="margin-left:22%;">Format for displaying
|
3431
|
+
non-printable Unicode code points.</p>
|
3432
|
+
|
3433
|
+
<p style="margin-left:11%;">LESS_IS_MORE</p>
|
3434
|
+
|
3435
|
+
<p style="margin-left:22%;">Emulate the <i>more</i> (1)
|
3436
|
+
command.</p>
|
3437
|
+
|
3438
|
+
<table width="100%" border=0 rules="none" frame="void"
|
3439
|
+
cellspacing="0" cellpadding="0">
|
3440
|
+
<tr valign="top" align="left">
|
3441
|
+
<td width="11%"></td>
|
3442
|
+
<td width="9%">
|
3443
|
+
|
3444
|
+
|
3445
|
+
<p style="margin-top: 1em" valign="top">LINES</p></td>
|
3446
|
+
<td width="2%"></td>
|
3447
|
+
<td width="78%">
|
3448
|
+
|
3449
|
+
|
3450
|
+
<p style="margin-top: 1em" valign="top">Sets the number of
|
3451
|
+
lines on the screen. Takes precedence over the number of
|
3452
|
+
lines specified by the TERM variable. (But if you have a
|
3453
|
+
windowing system which supports TIOCGWINSZ or WIOCGETD, the
|
3454
|
+
window system’s idea of the screen size takes
|
3455
|
+
precedence over the LINES and COLUMNS environment
|
3456
|
+
variables.)</p> </td>
|
3457
|
+
<tr valign="top" align="left">
|
3458
|
+
<td width="11%"></td>
|
3459
|
+
<td width="9%">
|
3460
|
+
|
3461
|
+
|
3462
|
+
<p style="margin-top: 1em" valign="top">PATH</p></td>
|
3463
|
+
<td width="2%"></td>
|
3464
|
+
<td width="78%">
|
3465
|
+
|
3466
|
+
|
3467
|
+
<p style="margin-top: 1em" valign="top">User’s search
|
3468
|
+
path (used to find a lesskey file on MS-DOS and OS/2
|
3469
|
+
systems).</p> </td>
|
3470
|
+
<tr valign="top" align="left">
|
3471
|
+
<td width="11%"></td>
|
3472
|
+
<td width="9%">
|
3473
|
+
|
3474
|
+
|
3475
|
+
<p style="margin-top: 1em" valign="top">SHELL</p></td>
|
3476
|
+
<td width="2%"></td>
|
3477
|
+
<td width="78%">
|
3478
|
+
|
3479
|
+
|
3480
|
+
<p style="margin-top: 1em" valign="top">The shell used to
|
3481
|
+
execute the ! command, as well as to expand filenames.</p></td>
|
3482
|
+
<tr valign="top" align="left">
|
3483
|
+
<td width="11%"></td>
|
3484
|
+
<td width="9%">
|
3485
|
+
|
3486
|
+
|
3487
|
+
<p style="margin-top: 1em" valign="top">TERM</p></td>
|
3488
|
+
<td width="2%"></td>
|
3489
|
+
<td width="78%">
|
3490
|
+
|
3491
|
+
|
3492
|
+
<p style="margin-top: 1em" valign="top">The type of
|
3493
|
+
terminal on which <i>less</i> is being run.</p></td>
|
3494
|
+
<tr valign="top" align="left">
|
3495
|
+
<td width="11%"></td>
|
3496
|
+
<td width="9%">
|
3497
|
+
|
3498
|
+
|
3499
|
+
<p style="margin-top: 1em" valign="top">VISUAL</p></td>
|
3500
|
+
<td width="2%"></td>
|
3501
|
+
<td width="78%">
|
3502
|
+
|
3503
|
+
|
3504
|
+
<p style="margin-top: 1em" valign="top">The name of the
|
3505
|
+
editor (used for the v command).</p></td>
|
3506
|
+
</table>
|
3507
|
+
|
3508
|
+
<a name="SEE ALSO"></a>
|
3509
|
+
<h2>SEE ALSO</h2>
|
3510
|
+
|
3511
|
+
|
3512
|
+
<p style="margin-left:11%; margin-top: 1em">lesskey(1)</p>
|
3513
|
+
|
3514
|
+
<a name="COPYRIGHT"></a>
|
3515
|
+
<h2>COPYRIGHT</h2>
|
3516
|
+
|
3517
|
+
|
3518
|
+
<p style="margin-left:11%; margin-top: 1em">Copyright (C)
|
3519
|
+
1984-2007 Mark Nudelman</p>
|
3520
|
+
|
3521
|
+
<p style="margin-left:11%; margin-top: 1em">less is part of
|
3522
|
+
the GNU project and is free software. You can redistribute
|
3523
|
+
it and/or modify it under the terms of either (1) the GNU
|
3524
|
+
General Public License as published by the Free Software
|
3525
|
+
Foundation; or (2) the Less License. See the file README in
|
3526
|
+
the less distribution for more details regarding
|
3527
|
+
redistribution. You should have received a copy of the GNU
|
3528
|
+
General Public License along with the source for less; see
|
3529
|
+
the file COPYING. If not, write to the Free Software
|
3530
|
+
Foundation, 59 Temple Place, Suite 330, Boston, MA
|
3531
|
+
02111-1307, USA. You should also have received a copy of the
|
3532
|
+
Less License; see the file LICENSE.</p>
|
3533
|
+
|
3534
|
+
<p style="margin-left:11%; margin-top: 1em">less is
|
3535
|
+
distributed in the hope that it will be useful, but WITHOUT
|
3536
|
+
ANY WARRANTY; without even the implied warranty of
|
3537
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
3538
|
+
GNU General Public License for more details.</p>
|
3539
|
+
|
3540
|
+
<a name="AUTHOR"></a>
|
3541
|
+
<h2>AUTHOR</h2>
|
3542
|
+
|
3543
|
+
|
3544
|
+
<p style="margin-left:11%; margin-top: 1em">Mark Nudelman
|
3545
|
+
<markn@greenwoodsoftware.com> <br>
|
3546
|
+
See http://www.greenwoodsoftware.com/less/bugs.html for the
|
3547
|
+
latest list of known bugs in less. <br>
|
3548
|
+
Send bug reports or comments to the above address or to <br>
|
3549
|
+
bug-less@gnu.org. <br>
|
3550
|
+
For more information, see the less homepage at <br>
|
3551
|
+
http://www.greenwoodsoftware.com/less.</p>
|
3552
|
+
<hr>
|
3553
|
+
</body>
|
3554
|
+
</html>
|