Imported Upstream version 551
[platform/upstream/less.git] / less.nro
1 .TH LESS 1 "Version 551: 11 Jun 2019"
2 .SH NAME
3 less \- opposite of more
4 .SH SYNOPSIS
5 .B "less \-?"
6 .br
7 .B "less \-\-help"
8 .br
9 .B "less \-V"
10 .br
11 .B "less \-\-version"
12 .br
13 .B "less [\-[+]aABcCdeEfFgGiIJKLmMnNqQrRsSuUVwWX~]"
14 .br
15 .B "     [\-b \fIspace\/\fP] [\-h \fIlines\/\fP] [\-j \fIline\/\fP] [\-k \fIkeyfile\/\fP]"
16 .br
17 .B "     [\-{oO} \fIlogfile\/\fP] [\-p \fIpattern\/\fP] [\-P \fIprompt\/\fP] [\-t \fItag\/\fP]"
18 .br
19 .B "     [\-T \fItagsfile\/\fP] [\-x \fItab\/\fP,...] [\-y \fIlines\/\fP] [\-[z] \fIlines\/\fP]"
20 .br
21 .B "     [\-# \fIshift\/\fP] [+[+]\fIcmd\/\fP] [\-\-] [\fIfilename\/\fP]..."
22 .br
23 (See the OPTIONS section for alternate option syntax with long option names.)
24
25 .SH DESCRIPTION
26 .I Less
27 is a program similar to
28 .I more
29 (1), but which allows backward movement
30 in the file as well as forward movement.
31 Also,
32 .I less
33 does not have to read the entire input file before starting,
34 so with large input files it starts up faster than text editors like
35 .I vi
36 (1).
37 .I Less
38 uses termcap (or terminfo on some systems),
39 so it can run on a variety of terminals.
40 There is even limited support for hardcopy terminals.
41 (On a hardcopy terminal, lines which should be printed at the top
42 of the screen are prefixed with a caret.)
43 .PP
44 Commands are based on both
45 .I more
46 and
47 .IR vi .
48 Commands may be preceded by a decimal number,
49 called N in the descriptions below.
50 The number is used by some commands, as indicated.
51
52 .SH COMMANDS
53 In the following descriptions, ^X means control-X.
54 ESC stands for the ESCAPE key; for example ESC-v means the
55 two character sequence "ESCAPE", then "v".
56 .IP "h or H"
57 Help: display a summary of these commands.
58 If you forget all the other commands, remember this one.
59 .IP "SPACE or ^V or f or ^F"
60 Scroll forward N lines, default one window (see option \-z below).
61 If N is more than the screen size, only the final screenful is displayed.
62 Warning: some systems use ^V as a special literalization character.
63 .IP "z"
64 Like SPACE, but if N is specified, it becomes the new window size.
65 .IP "ESC-SPACE"
66 Like SPACE, but scrolls a full screenful, even if it reaches
67 end-of-file in the process.
68 .IP "ENTER or RETURN or ^N or e or ^E or j or ^J"
69 Scroll forward N lines, default 1.
70 The entire N lines are displayed, even if N is more than the screen size.
71 .IP "d or ^D"
72 Scroll forward N lines, default one half of the screen size.
73 If N is specified, it becomes the new default for
74 subsequent d and u commands.
75 .IP "b or ^B or ESC-v"
76 Scroll backward N lines, default one window (see option \-z below).
77 If N is more than the screen size, only the final screenful is displayed.
78 .IP "w"
79 Like ESC-v, but if N is specified, it becomes the new window size.
80 .IP "y or ^Y or ^P or k or ^K"
81 Scroll backward N lines, default 1.
82 The entire N lines are displayed, even if N is more than the screen size.
83 Warning: some systems use ^Y as a special job control character.
84 .IP "u or ^U"
85 Scroll backward N lines, default one half of the screen size.
86 If N is specified, it becomes the new default for
87 subsequent d and u commands.
88 .IP "J"
89 Like j, but continues to scroll beyond the end of the file.
90 .IP "K or Y"
91 Like k, but continues to scroll beyond the beginning of the file.
92 .IP "ESC-) or RIGHTARROW"
93 Scroll horizontally right N characters, default half the screen width
94 (see the \-# option).
95 If a number N is specified, it becomes the default for future RIGHTARROW
96 and LEFTARROW commands.
97 While the text is scrolled, it acts as though the \-S option
98 (chop lines) were in effect.
99 .IP "ESC-( or LEFTARROW"
100 Scroll horizontally left N characters, default half the screen width
101 (see the \-# option).
102 If a number N is specified, it becomes the default for future RIGHTARROW
103 and LEFTARROW commands.
104 .IP "ESC-} or ^RIGHTARROW"
105 Scroll horizontally right to show the end of the longest displayed line.
106 .IP "ESC-{ or ^LEFTARROW"
107 Scroll horizontally left back to the first column.
108 .IP "r or ^R or ^L"
109 Repaint the screen.
110 .IP R
111 Repaint the screen, discarding any buffered input.
112 Useful if the file is changing while it is being viewed.
113 .IP "F"
114 Scroll forward, and keep trying to read when the
115 end of file is reached.
116 Normally this command would be used when already at the end of the file.
117 It is a way to monitor the tail of a file which is growing
118 while it is being viewed.
119 (The behavior is similar to the "tail \-f" command.)
120 .IP "ESC-F"
121 Like F, but as soon as a line is found which matches
122 the last search pattern, the terminal bell is rung
123 and forward scrolling stops.
124 .IP "g or < or ESC-<"
125 Go to line N in the file, default 1 (beginning of file).
126 (Warning: this may be slow if N is large.)
127 .IP "G or > or ESC->"
128 Go to line N in the file, default the end of the file.
129 (Warning: this may be slow if N is large,
130 or if N is not specified and
131 standard input, rather than a file, is being read.)
132 .IP "ESC-G"
133 Same as G, except if no number N is specified and the input is standard input,
134 goes to the last line which is currently buffered.
135 .IP "p or %"
136 Go to a position N percent into the file.
137 N should be between 0 and 100, and may contain a decimal point.
138 .IP "P"
139 Go to the line containing byte offset N in the file.
140 .IP "{"
141 If a left curly bracket appears in the top line displayed
142 on the screen,
143 the { command will go to the matching right curly bracket.
144 The matching right curly bracket is positioned on the bottom
145 line of the screen.
146 If there is more than one left curly bracket on the top line,
147 a number N may be used to specify the N-th bracket on the line.
148 .IP "}"
149 If a right curly bracket appears in the bottom line displayed
150 on the screen,
151 the } command will go to the matching left curly bracket.
152 The matching left curly bracket is positioned on the top
153 line of the screen.
154 If there is more than one right curly bracket on the top line,
155 a number N may be used to specify the N-th bracket on the line.
156 .IP "("
157 Like {, but applies to parentheses rather than curly brackets.
158 .IP ")"
159 Like }, but applies to parentheses rather than curly brackets.
160 .IP "["
161 Like {, but applies to square brackets rather than curly brackets.
162 .IP "]"
163 Like }, but applies to square brackets rather than curly brackets.
164 .IP "ESC-^F"
165 Followed by two characters,
166 acts like {, but uses the two characters as open and close brackets,
167 respectively.
168 For example, "ESC ^F < >" could be used to
169 go forward to the > which matches the < in the top displayed line.
170 .IP "ESC-^B"
171 Followed by two characters,
172 acts like }, but uses the two characters as open and close brackets,
173 respectively.
174 For example, "ESC ^B < >" could be used to
175 go backward to the < which matches the > in the bottom displayed line.
176 .IP m
177 Followed by any lowercase or uppercase letter,
178 marks the first displayed line with that letter.
179 If the status column is enabled via the \-J option,
180 the status column shows the marked line.
181 .IP M
182 Acts like m, except the last displayed line is marked
183 rather than the first displayed line.
184 .IP "'"
185 (Single quote.)
186 Followed by any lowercase or uppercase letter, returns to the position which
187 was previously marked with that letter.
188 Followed by another single quote, returns to the position at
189 which the last "large" movement command was executed.
190 Followed by a ^ or $, jumps to the beginning or end of the
191 file respectively.
192 Marks are preserved when a new file is examined,
193 so the ' command can be used to switch between input files.
194 .IP "^X^X"
195 Same as single quote.
196 .IP "ESC-m"
197 Followed by any lowercase or uppercase letter,
198 clears the mark identified by that letter.
199 .IP /pattern
200 Search forward in the file for the N-th line containing the pattern.
201 N defaults to 1.
202 The pattern is a regular expression, as recognized by
203 the regular expression library supplied by your system.
204 The search starts at the first line displayed
205 (but see the \-a and \-j options, which change this).
206 .sp
207 Certain characters are special
208 if entered at the beginning of the pattern;
209 they modify the type of search rather than become part of the pattern:
210 .RS
211 .IP "^N or !"
212 Search for lines which do NOT match the pattern.
213 .IP "^E or *"
214 Search multiple files.
215 That is, if the search reaches the END of the current file
216 without finding a match,
217 the search continues in the next file in the command line list.
218 .IP "^F or @"
219 Begin the search at the first line of the FIRST file
220 in the command line list,
221 regardless of what is currently displayed on the screen
222 or the settings of the \-a or \-j options.
223 .IP "^K"
224 Highlight any text which matches the pattern on the current screen,
225 but don't move to the first match (KEEP current position).
226 .IP "^R"
227 Don't interpret regular expression metacharacters;
228 that is, do a simple textual comparison.
229 .RE
230 .IP ?pattern
231 Search backward in the file for the N-th line containing the pattern.
232 The search starts at the last line displayed 
233 (but see the \-a and \-j options, which change this).
234 .sp
235 Certain characters are special as in the / command:
236 .RS
237 .IP "^N or !"
238 Search for lines which do NOT match the pattern.
239 .IP "^E or *"
240 Search multiple files.
241 That is, if the search reaches the beginning of the current file
242 without finding a match,
243 the search continues in the previous file in the command line list.
244 .IP "^F or @"
245 Begin the search at the last line of the last file
246 in the command line list,
247 regardless of what is currently displayed on the screen
248 or the settings of the \-a or \-j options.
249 .IP "^K"
250 As in forward searches.
251 .IP "^R"
252 As in forward searches.
253 .RE
254 .IP "ESC-/pattern"
255 Same as "/*".
256 .IP "ESC-?pattern"
257 Same as "?*".
258 .IP n
259 Repeat previous search, for N-th line containing the last pattern.
260 If the previous search was modified by ^N, the search is made for the
261 N-th line NOT containing the pattern.
262 If the previous search was modified by ^E, the search continues
263 in the next (or previous) file if not satisfied in the current file.
264 If the previous search was modified by ^R, the search is done
265 without using regular expressions.
266 There is no effect if the previous search was modified by ^F or ^K.
267 .IP N
268 Repeat previous search, but in the reverse direction.
269 .IP "ESC-n"
270 Repeat previous search, but crossing file boundaries.
271 The effect is as if the previous search were modified by *.
272 .IP "ESC-N"
273 Repeat previous search, but in the reverse direction
274 and crossing file boundaries.
275 .IP "ESC-u"
276 Undo search highlighting.
277 Turn off highlighting of strings matching the current search pattern.
278 If highlighting is already off because of a previous ESC-u command,
279 turn highlighting back on.
280 Any search command will also turn highlighting back on.
281 (Highlighting can also be disabled by toggling the \-G option;
282 in that case search commands do not turn highlighting back on.)
283 .IP "&pattern"
284 Display only lines which match the pattern;
285 lines which do not match the pattern are not displayed.
286 If pattern is empty (if you type & immediately followed by ENTER),
287 any filtering is turned off, and all lines are displayed.
288 While filtering is in effect, an ampersand is displayed at the
289 beginning of the prompt,
290 as a reminder that some lines in the file may be hidden.
291 .sp
292 Certain characters are special as in the / command:
293 .RS
294 .IP "^N or !"
295 Display only lines which do NOT match the pattern.
296 .IP "^R"
297 Don't interpret regular expression metacharacters;
298 that is, do a simple textual comparison.
299 .RE
300 .IP ":e [filename]"
301 Examine a new file.
302 If the filename is missing, the "current" file (see the :n and :p commands
303 below) from the list of files in the command line is re-examined.
304 A percent sign (%) in the filename is replaced by the name of the
305 current file.
306 A pound sign (#) is replaced by the name of the previously examined file.
307 However, two consecutive percent signs are simply
308 replaced with a single percent sign.
309 This allows you to enter a filename that contains a percent sign
310 in the name.
311 Similarly, two consecutive pound signs are replaced with a single pound sign.
312 The filename is inserted into the command line list of files
313 so that it can be seen by subsequent :n and :p commands.
314 If the filename consists of several files, they are all inserted into
315 the list of files and the first one is examined.
316 If the filename contains one or more spaces,
317 the entire filename should be enclosed in double quotes
318 (also see the \-" option).
319 .IP "^X^V or E"
320 Same as :e.
321 Warning: some systems use ^V as a special literalization character.
322 On such systems, you may not be able to use ^V.
323 .IP ":n"
324 Examine the next file (from the list of files given in the command line).
325 If a number N is specified, the N-th next file is examined.
326 .IP ":p"
327 Examine the previous file in the command line list.
328 If a number N is specified, the N-th previous file is examined.
329 .IP ":x"
330 Examine the first file in the command line list.
331 If a number N is specified, the N-th file in the list is examined.
332 .IP ":d"
333 Remove the current file from the list of files.
334 .IP "t"
335 Go to the next tag, if there were more than one matches for the current tag.
336 See the \-t option for more details about tags.
337 .IP "T"
338 Go to the previous tag, if there were more than one matches for the current tag.
339 .IP "= or ^G or :f"
340 Prints some information about the file being viewed,
341 including its name
342 and the line number and byte offset of the bottom line being displayed.
343 If possible, it also prints the length of the file,
344 the number of lines in the file
345 and the percent of the file above the last displayed line.
346 .IP \-
347 Followed by one of the command line option letters (see OPTIONS below),
348 this will change the setting of that option
349 and print a message describing the new setting.
350 If a ^P (CONTROL-P) is entered immediately after the dash,
351 the setting of the option is changed but no message is printed.
352 If the option letter has a numeric value (such as \-b or \-h),
353 or a string value (such as \-P or \-t),
354 a new value may be entered after the option letter.
355 If no new value is entered, a message describing
356 the current setting is printed and nothing is changed.
357 .IP \-\-
358 Like the \- command, but takes a long option name (see OPTIONS below)
359 rather than a single option letter.
360 You must press ENTER or RETURN after typing the option name.
361 A ^P immediately after the second dash suppresses printing of a
362 message describing the new setting, as in the \- command.
363 .IP \-+
364 Followed by one of the command line option letters
365 this will reset the option to its default setting
366 and print a message describing the new setting.
367 (The "\-+\fIX\fP" command does the same thing
368 as "\-+\fIX\fP" on the command line.)
369 This does not work for string-valued options.
370 .IP \-\-+
371 Like the \-+ command, but takes a long option name
372 rather than a single option letter.
373 .IP \-!
374 Followed by one of the command line option letters,
375 this will reset the option to the "opposite" of its default setting
376 and print a message describing the new setting.
377 This does not work for numeric or string-valued options.
378 .IP \-\-!
379 Like the \-! command, but takes a long option name
380 rather than a single option letter.
381 .IP _
382 (Underscore.)
383 Followed by one of the command line option letters,
384 this will print a message describing the current setting of that option.
385 The setting of the option is not changed.
386 .IP __
387 (Double underscore.)
388 Like the _ (underscore) command, but takes a long option name
389 rather than a single option letter.
390 You must press ENTER or RETURN after typing the option name.
391 .IP +cmd
392 Causes the specified cmd to be executed each time a new file is examined.
393 For example, +G causes
394 .I less
395 to initially display each file starting at the end
396 rather than the beginning.
397 .IP V
398 Prints the version number of
399 .I less
400 being run.
401 .IP "q or Q or :q or :Q or ZZ"
402 Exits
403 .IR less .
404 .PP
405 The following
406 four
407 commands may or may not be valid, depending on your particular installation.
408 .PP
409 .IP v
410 Invokes an editor to edit the current file being viewed.
411 The editor is taken from the environment variable VISUAL if defined,
412 or EDITOR if VISUAL is not defined,
413 or defaults to "vi" if neither VISUAL nor EDITOR is defined.
414 See also the discussion of LESSEDIT under the section on PROMPTS below.
415 .IP "! shell-command"
416 Invokes a shell to run the shell-command given.
417 A percent sign (%) in the command is replaced by the name of the
418 current file.
419 A pound sign (#) is replaced by the name of the previously examined file.
420 "!!" repeats the last shell command.
421 "!" with no shell command simply invokes a shell.
422 On Unix systems, the shell is taken from the environment variable SHELL,
423 or defaults to "sh".
424 On MS-DOS and OS/2 systems, the shell is the normal command processor.
425 .IP "| <m> shell-command"
426 <m> represents any mark letter.
427 Pipes a section of the input file to the given shell command.
428 The section of the file to be piped is between the position marked by 
429 the letter and the current screen.
430 The entire current screen is included, regardless of whether the
431 marked position is before or after the current screen.
432 <m> may also be ^ or $ to indicate beginning or end of file respectively.
433 If <m> is \&.\& or newline, the current screen is piped.
434 .IP "s filename"
435 Save the input to a file.
436 This only works if the input is a pipe, not an ordinary file.
437 .PP
438 .SH OPTIONS
439 Command line options are described below.
440 Most options may be changed while
441 .I less
442 is running, via the "\-" command.
443 .PP
444 Most options may be given in one of two forms:
445 either a dash followed by a single letter,
446 or two dashes followed by a long option name.
447 A long option name may be abbreviated as long as
448 the abbreviation is unambiguous.
449 For example, \-\-quit-at-eof may be abbreviated \-\-quit, but not
450 \-\-qui, since both \-\-quit-at-eof and \-\-quiet begin with \-\-qui.
451 Some long option names are in uppercase, such as \-\-QUIT-AT-EOF, as
452 distinct from \-\-quit-at-eof.
453 Such option names need only have their first letter capitalized;
454 the remainder of the name may be in either case.
455 For example, \-\-Quit-at-eof is equivalent to \-\-QUIT-AT-EOF.
456 .PP
457 Options are also taken from the environment variable "LESS".
458 For example,
459 to avoid typing "less \-options \&...\&" each time
460 .I less
461 is invoked, you might tell
462 .IR csh :
463 .sp
464 setenv LESS "\-options"
465 .sp
466 or if you use
467 .IR sh :
468 .sp
469 LESS="\-options"; export LESS
470 .sp
471 On MS-DOS, you don't need the quotes, but you should replace any
472 percent signs in the options string by double percent signs.
473 .sp
474 The environment variable is parsed before the command line,
475 so command line options override the LESS environment variable.
476 If an option appears in the LESS variable, it can be reset
477 to its default value on the command line by beginning the command
478 line option with "\-+".
479 .sp
480 Some options like \-k or \-D require a string to follow the option letter.
481 The string for that option is considered to end when a dollar sign ($) is found.
482 For example, you can set two \-D options on MS-DOS like this:
483 .sp
484 LESS="Dn9.1$Ds4.1"
485 .sp
486 If the \-\-use-backslash option appears earlier in the options, then
487 a dollar sign or backslash may be included literally in an option string
488 by preceding it with a backslash.
489 If the \-\-use-backslash option is not in effect, then backslashes are
490 not treated specially, and there is no way to include a dollar sign
491 in the option string.
492 .IP "\-? or \-\-help"
493 This option displays a summary of the commands accepted by
494 .I less
495 (the same as the h command).
496 (Depending on how your shell interprets the question mark,
497 it may be necessary to quote the question mark, thus: "\-\e?".)
498 .IP "\-a or \-\-search-skip-screen"
499 By default, forward searches start at the top of the displayed screen
500 and backwards searches start at the bottom of the displayed screen
501 (except for repeated searches invoked by the n or N commands,
502 which start after or before the "target" line respectively;
503 see the \-j option for more about the target line).
504 The \-a option causes forward searches to instead start at
505 the bottom of the screen
506 and backward searches to start at the top of the screen,
507 thus skipping all lines displayed on the screen.
508 .IP "\-A or \-\-SEARCH-SKIP-SCREEN"
509 Causes all forward searches (not just non-repeated searches)
510 to start just after the target line, and all backward searches
511 to start just before the target line.
512 Thus, forward searches will skip part of the displayed screen
513 (from the first line up to and including the target line).
514 Similarly backwards searches will skip the displayed screen
515 from the last line up to and including the target line.
516 This was the default behavior in less versions prior to 441.
517 .IP "\-b\fIn\fP or \-\-buffers=\fIn\fP"
518 Specifies the amount of buffer space
519 .I less
520 will use for each file, in units of kilobytes (1024 bytes).
521 By default 64\ K of buffer space is used for each file
522 (unless the file is a pipe; see the \-B option).
523 The \-b option specifies instead that \fIn\fP kilobytes of
524 buffer space should be used for each file.
525 If \fIn\fP is \-1, buffer space is unlimited; that is,
526 the entire file can be read into memory.
527 .IP "\-B or \-\-auto-buffers"
528 By default, when data is read from a pipe,
529 buffers are allocated automatically as needed.
530 If a large amount of data is read from the pipe, this can cause
531 a large amount of memory to be allocated.
532 The \-B option disables this automatic allocation of buffers for pipes,
533 so that only 64\ K
534 (or the amount of space specified by the \-b option)
535 is used for the pipe.
536 Warning: use of \-B can result in erroneous display, since only the
537 most recently viewed part of the piped data is kept in memory;
538 any earlier data is lost.
539 .IP "\-c or \-\-clear-screen"
540 Causes full screen repaints to be painted from the top line down.
541 By default,
542 full screen repaints are done by scrolling from the bottom of the screen.
543 .IP "\-C or \-\-CLEAR-SCREEN"
544 Same as \-c, for compatibility with older versions of
545 .IR less .
546 .IP "\-d or \-\-dumb"
547 The \-d option suppresses the error message
548 normally displayed if the terminal is dumb;
549 that is, lacks some important capability,
550 such as the ability to clear the screen or scroll backward.
551 The \-d option does not otherwise change the behavior of
552 .I less
553 on a dumb terminal.
554 .IP "\-D\fBx\fP\fIcolor\fP or \-\-color=\fBx\fP\fIcolor\fP"
555 [MS-DOS only]
556 Sets the color of the text displayed.
557 \fBx\fP is a single character which selects the type of text whose color is
558 being set: n=normal, s=standout, d=bold, u=underlined, k=blink.
559 \fIcolor\fP is a pair of numbers separated by a period.
560 The first number selects the foreground color and the second selects
561 the background color of the text.
562 A single number \fIN\fP is the same as \fIN.M\fP,
563 where \fIM\fP is the normal background color.
564 The color may start or end with \fBu\fP to use underline (with the normal
565 color, if by itself), if the system supports it (Windows only).
566 \fBx\fP may also be \fBa\fP to toggle strict ANSI sequence rendering (SGR mode).
567
568 .IP "\-e or \-\-quit-at-eof"
569 Causes
570 .I less
571 to automatically exit
572 the second time it reaches end-of-file.
573 By default, the only way to exit
574 .I less
575 is via the "q" command.
576 .IP "\-E or \-\-QUIT-AT-EOF"
577 Causes
578 .I less
579 to automatically exit the first time it reaches end-of-file.
580 .IP "\-f or \-\-force"
581 Forces non-regular files to be opened.
582 (A non-regular file is a directory or a device special file.)
583 Also suppresses the warning message when a binary file is opened.
584 By default,
585 .I less
586 will refuse to open non-regular files.
587 Note that some operating systems will not allow directories
588 to be read, even if \-f is set.
589 .IP "\-F or \-\-quit-if-one-screen"
590 Causes
591 .I less
592 to automatically exit
593 if the entire file can be displayed on the first screen.
594 .IP "\-g or \-\-hilite-search"
595 Normally,
596 .I less
597 will highlight ALL strings which match the last search command.
598 The \-g option changes this behavior to highlight only the particular string
599 which was found by the last search command.
600 This can cause
601 .I less
602 to run somewhat faster than the default.
603 .IP "\-G or \-\-HILITE-SEARCH"
604 The \-G option suppresses all highlighting of strings found by search commands.
605 .IP "\-h\fIn\fP or \-\-max-back-scroll=\fIn\fP"
606 Specifies a maximum number of lines to scroll backward.
607 If it is necessary to scroll backward more than \fIn\fP lines,
608 the screen is repainted in a forward direction instead.
609 (If the terminal does not have the ability to scroll
610 backward, \-h0 is implied.)
611 .IP "\-i or \-\-ignore-case"
612 Causes searches to ignore case; that is,
613 uppercase and lowercase are considered identical.
614 This option is ignored if any uppercase letters
615 appear in the search pattern;
616 in other words,
617 if a pattern contains uppercase letters, then that search does not ignore case.
618 .IP "\-I or \-\-IGNORE-CASE"
619 Like \-i, but searches ignore case even if
620 the pattern contains uppercase letters.
621 .IP "\-j\fIn\fP or \-\-jump-target=\fIn\fP"
622 Specifies a line on the screen where the "target" line
623 is to be positioned.
624 The target line is the line specified by any command to
625 search for a pattern, jump to a line number,
626 jump to a file percentage or jump to a tag.
627 The screen line may be specified by a number: the top line on the screen
628 is 1, the next is 2, and so on.
629 The number may be negative to specify a line relative to the bottom
630 of the screen: the bottom line on the screen is \-1, the second
631 to the bottom is \-2, and so on.
632 Alternately, the screen line may be specified as a fraction of the height
633 of the screen, starting with a decimal point: \&.5 is in the middle of the
634 screen, \&.3 is three tenths down from the first line, and so on.
635 If the line is specified as a fraction, the actual line number
636 is recalculated if the terminal window is resized, so that the
637 target line remains at the specified fraction of the screen height.
638 If any form of the \-j option is used,
639 repeated forward searches (invoked with "n" or "N")
640 begin at the line immediately after the target line,
641 and repeated backward searches begin at the target line,
642 unless changed by \-a or \-A.
643 For example, if "\-j4" is used, the target line is the
644 fourth line on the screen, so forward searches begin at the fifth line
645 on the screen.
646 However nonrepeated searches (invoked with "/" or "?")
647 always begin at the start or end of the current screen respectively.
648 .IP "\-J or \-\-status-column"
649 Displays a status column at the left edge of the screen.
650 The status column shows the lines that matched the current search,
651 and any lines that are marked (via the m or M command).
652 The status column is also used if the \-w or \-W option is in effect.
653 .IP "\-k\fIfilename\fP or \-\-lesskey-file=\fIfilename\fP"
654 Causes
655 .I less
656 to open and interpret the named file as a
657 .I lesskey
658 (1) file.
659 Multiple \-k options may be specified.
660 If the LESSKEY or LESSKEY_SYSTEM environment variable is set, or
661 if a lesskey file is found in a standard place (see KEY BINDINGS),
662 it is also used as a
663 .I lesskey
664 file.
665 .IP "\-K or \-\-quit-on-intr"
666 Causes
667 .I less
668 to exit immediately (with status 2)
669 when an interrupt character (usually ^C) is typed.
670 Normally, an interrupt character causes
671 .I less
672 to stop whatever it is doing and return to its command prompt.
673 Note that use of this option makes it impossible to return to the
674 command prompt from the "F" command.
675 .IP "\-L or \-\-no-lessopen"
676 Ignore the LESSOPEN environment variable
677 (see the INPUT PREPROCESSOR section below).
678 This option can be set from within \fIless\fP,
679 but it will apply only to files opened subsequently, not to the
680 file which is currently open.
681 .IP "\-m or \-\-long-prompt"
682 Causes
683 .I less
684 to prompt verbosely (like \fImore\fP),
685 with the percent into the file.
686 By default,
687 .I less
688 prompts with a colon.
689 .IP "\-M or \-\-LONG-PROMPT"
690 Causes
691 .I less
692 to prompt even more verbosely than
693 .IR more .
694 .IP "\-n or \-\-line-numbers"
695 Suppresses line numbers.
696 The default (to use line numbers) may cause
697 .I less
698 to run more slowly in some cases, especially with a very large input file.
699 Suppressing line numbers with the \-n option will avoid this problem.
700 Using line numbers means: the line number will be displayed in the verbose
701 prompt and in the = command,
702 and the v command will pass the current line number to the editor
703 (see also the discussion of LESSEDIT in PROMPTS below).
704 .IP "\-N or \-\-LINE-NUMBERS"
705 Causes a line number to be displayed at the beginning of
706 each line in the display.
707 .IP "\-o\fIfilename\fP or \-\-log-file=\fIfilename\fP"
708 Causes
709 .I less
710 to copy its input to the named file as it is being viewed.
711 This applies only when the input file is a pipe,
712 not an ordinary file.
713 If the file already exists,
714 .I less
715 will ask for confirmation before overwriting it.
716 .IP "\-O\fIfilename\fP or \-\-LOG-FILE=\fIfilename\fP"
717 The \-O option is like \-o, but it will overwrite an existing
718 file without asking for confirmation.
719 .sp
720 If no log file has been specified,
721 the \-o and \-O options can be used from within
722 .I less
723 to specify a log file.
724 Without a file name, they will simply report the name of the log file.
725 The "s" command is equivalent to specifying \-o from within
726 .IR less .
727 .IP "\-p\fIpattern\fP or \-\-pattern=\fIpattern\fP"
728 The \-p option on the command line is equivalent to
729 specifying +/\fIpattern\fP;
730 that is, it tells
731 .I less
732 to start at the first occurrence of \fIpattern\fP in the file.
733 .IP "\-P\fIprompt\fP or \-\-prompt=\fIprompt\fP"
734 Provides a way to tailor the three prompt
735 styles to your own preference.
736 This option would normally be put in the LESS environment
737 variable, rather than being typed in with each
738 .I less
739 command.
740 Such an option must either be the last option in the LESS variable,
741 or be terminated by a dollar sign.
742  \-Ps followed by a string changes the default (short) prompt
743 to that string.
744  \-Pm changes the medium (\-m) prompt.
745  \-PM changes the long (\-M) prompt.
746  \-Ph changes the prompt for the help screen.
747  \-P= changes the message printed by the = command.
748  \-Pw changes the message printed while waiting for data (in the F command).
749
750 All prompt strings consist of a sequence of
751 letters and special escape sequences.
752 See the section on PROMPTS for more details.
753 .IP "\-q or \-\-quiet or \-\-silent"
754 Causes moderately "quiet" operation:
755 the terminal bell is not rung
756 if an attempt is made to scroll past the end of the file
757 or before the beginning of the file.
758 If the terminal has a "visual bell", it is used instead.
759 The bell will be rung on certain other errors,
760 such as typing an invalid character.
761 The default is to ring the terminal bell in all such cases.
762 .IP "\-Q or \-\-QUIET or \-\-SILENT"
763 Causes totally "quiet" operation:
764 the terminal bell is never rung.
765 If the terminal has a "visual bell", it is used in all cases 
766 where the terminal bell would have been rung.
767 .IP "\-r or \-\-raw-control-chars"
768 Causes "raw" control characters to be displayed.
769 The default is to display control characters using the caret notation;
770 for example, a control-A (octal 001) is displayed as "^A".
771 Warning: when the \-r option is used,
772 .I less
773 cannot keep track of the actual appearance of the screen
774 (since this depends on how the screen responds to
775 each type of control character).
776 Thus, various display problems may result,
777 such as long lines being split in the wrong place.
778 .IP "\-R or \-\-RAW-CONTROL-CHARS"
779 Like \-r, but only ANSI "color" escape sequences are output in "raw" form.
780 Unlike \-r, the screen appearance is maintained correctly in most cases.
781 ANSI "color" escape sequences are sequences of the form:
782 .sp
783         ESC [ \&...\& m
784 .sp
785 where the "...\&" is zero or more color specification characters
786 For the purpose of keeping track of screen appearance,
787 ANSI color escape sequences are assumed to not move the cursor.
788 You can make
789 .I less
790 think that characters other than "m" can end ANSI color escape sequences
791 by setting the environment variable LESSANSIENDCHARS to the list of
792 characters which can end a color escape sequence.
793 And you can make
794 .I less
795 think that characters other than the standard ones may appear between
796 the ESC and the m by setting the environment variable LESSANSIMIDCHARS
797 to the list of characters which can appear.
798 .IP "\-s or \-\-squeeze-blank-lines"
799 Causes consecutive blank lines to be squeezed into a single blank line.
800 This is useful when viewing
801 .I nroff
802 output.
803 .IP "\-S or \-\-chop-long-lines"
804 Causes lines longer than the screen width to be
805 chopped (truncated) rather than wrapped.
806 That is, the portion of a long line that does not fit in
807 the screen width is not shown.
808 The default is to wrap long lines; that is, display the remainder
809 on the next line.
810 .IP "\-t\fItag\fP or \-\-tag=\fItag\fP"
811 The \-t option, followed immediately by a TAG,
812 will edit the file containing that tag.
813 For this to work, tag information must be available;
814 for example, there may be a file in the current directory called "tags",
815 which was previously built by
816 .I ctags
817 (1) or an equivalent command.
818 If the environment variable LESSGLOBALTAGS is set, it is taken to be
819 the name of a command compatible with
820 .I global
821 (1), and that command is executed to find the tag.
822 (See http://www.gnu.org/software/global/global.html).
823 The \-t option may also be specified from within
824 .I less
825 (using the \- command) as a way of examining a new file.
826 The command ":t" is equivalent to specifying \-t from within
827 .IR less .
828 .IP "\-T\fItagsfile\fP or \-\-tag-file=\fItagsfile\fP"
829 Specifies a tags file to be used instead of "tags".
830 .IP "\-u or \-\-underline-special"
831 Causes backspaces and carriage returns to be treated as printable characters;
832 that is, they are sent to the terminal when they appear in the input.
833 .IP "\-U or \-\-UNDERLINE-SPECIAL"
834 Causes backspaces, tabs, carriage returns and "formatting characters"
835 (as defined by Unicode) to be treated as control characters;
836 that is, they are handled as specified by the \-r option.
837 .sp
838 By default, if neither \-u nor \-U is given,
839 backspaces which appear adjacent to an underscore character
840 are treated specially:
841 the underlined text is displayed
842 using the terminal's hardware underlining capability.
843 Also, backspaces which appear between two identical characters
844 are treated specially:
845 the overstruck text is printed
846 using the terminal's hardware boldface capability.
847 Other backspaces are deleted, along with the preceding character.
848 Carriage returns immediately followed by a newline are deleted.
849 Other carriage returns are handled as specified by the \-r option.
850 Text which is overstruck or underlined can be searched for
851 if neither \-u nor \-U is in effect.
852 .IP "\-V or \-\-version"
853 Displays the version number of
854 .IR less .
855 .IP "\-w or \-\-hilite-unread"
856 Temporarily highlights the first "new" line after a forward movement
857 of a full page.
858 The first "new" line is the line immediately following the line previously
859 at the bottom of the screen.
860 Also highlights the target line after a g or p command.
861 The highlight is removed at the next command which causes movement.
862 The entire line is highlighted, unless the \-J option is in effect,
863 in which case only the status column is highlighted.
864 .IP "\-W or \-\-HILITE-UNREAD"
865 Like \-w, but temporarily highlights the first new line after any
866 forward movement command larger than one line.
867 .IP "\-x\fIn\fP,...\& or \-\-tabs=\fIn\fP,..."
868 Sets tab stops.
869 If only one \fIn\fP is specified, tab stops are set at multiples of \fIn\fP.
870 If multiple values separated by commas are specified, tab stops
871 are set at those positions, and then continue with the same spacing as the
872 last two.
873 For example, \fI-x9,17\fP will set tabs at positions 9, 17, 25, 33, etc.
874 The default for \fIn\fP is 8.
875 .IP "\-X or \-\-no-init"
876 Disables sending the termcap initialization and deinitialization strings
877 to the terminal.
878 This is sometimes desirable if the deinitialization string does
879 something unnecessary, like clearing the screen.
880 .IP "\-y\fIn\fP or \-\-max-forw-scroll=\fIn\fP"
881 Specifies a maximum number of lines to scroll forward.
882 If it is necessary to scroll forward more than \fIn\fP lines,
883 the screen is repainted instead.
884 The \-c or \-C option may be used to repaint from the top of
885 the screen if desired.
886 By default, any forward movement causes scrolling.
887 .IP "\-z\fIn\fP or \-\-window=\fIn\fP or \-\fIn\fP"
888 Changes the default scrolling window size to \fIn\fP lines.
889 The default is one screenful.
890 The z and w commands can also be used to change the window size.
891 The "z" may be omitted for compatibility with some versions of
892 .IR more .
893 If the number
894 .I n
895 is negative, it indicates
896 .I n
897 lines less than the current screen size.
898 For example, if the screen is 24 lines, \fI\-z\-4\fP sets the
899 scrolling window to 20 lines.  If the screen is resized to 40 lines,
900 the scrolling window automatically changes to 36 lines.
901 .IP "\-\(dq\fIcc\fP\ or\ \-\-quotes=\fIcc\fP"
902 Changes the filename quoting character.
903 This may be necessary if you are trying to name a file
904 which contains both spaces and quote characters.
905 Followed by a single character, this changes the quote character to that
906 character.
907 Filenames containing a space should then be surrounded by that character
908 rather than by double quotes.
909 Followed by two characters, changes the open quote to the first character,
910 and the close quote to the second character.
911 Filenames containing a space should then be preceded by the open quote
912 character and followed by the close quote character.
913 Note that even after the quote characters are changed, this option
914 remains \-" (a dash followed by a double quote).
915 .IP "\-~ or \-\-tilde"
916 Normally lines after end of file are displayed as a single tilde (~).
917 This option causes lines after end of file to be displayed as blank lines.
918 .IP "\-# or \-\-shift"
919 Specifies the default number of positions to scroll horizontally
920 in the RIGHTARROW and LEFTARROW commands.
921 If the number specified is zero, it sets the default number of
922 positions to one half of the screen width.
923 Alternately, the number may be specified as a fraction of the width
924 of the screen, starting with a decimal point: \&.5 is half of the
925 screen width, \&.3 is three tenths of the screen width, and so on.
926 If the number is specified as a fraction, the actual number of
927 scroll positions is recalculated if the terminal window is resized,
928 so that the actual scroll remains at the specified fraction
929 of the screen width.
930 .IP "\-\-follow-name"
931 Normally, if the input file is renamed while an F command is executing,
932 .I less
933 will continue to display the contents of the original file despite
934 its name change.
935 If \-\-follow-name is specified, during an F command
936 .I less
937 will periodically attempt to reopen the file by name.
938 If the reopen succeeds and the file is a different file from the original
939 (which means that a new file has been created
940 with the same name as the original (now renamed) file),
941 .I less
942 will display the contents of that new file.
943 .IP "\-\-mouse"
944 Enables mouse input:
945 scrolling the mouse wheel down moves forward in the file,
946 scrolling the mouse wheel up moves backwards in the file,
947 and clicking the mouse sets the "#" mark to the line 
948 where the mouse is clicked.
949 The number of lines to scroll when the wheel is moved 
950 can be set by the \-\-wheel-lines option.
951 Mouse input works only on terminals which support X11 mouse reporting,
952 and on the Windows version of 
953 .IR less .
954 .IP "\-\-MOUSE"
955 Like \-\-mouse, except the direction scrolled 
956 on mouse wheel movement is reversed.
957 .IP "\-\-no-keypad"
958 Disables sending the keypad initialization and deinitialization strings
959 to the terminal.
960 This is sometimes useful if the keypad strings make the numeric
961 keypad behave in an undesirable manner.
962 .IP "\-\-no-histdups"
963 This option changes the behavior so that if a search string or
964 file name is typed in, and the same string is already in the history list, 
965 the existing copy is removed from the history list before the new one is added.
966 Thus, a given string will appear only once in the history list.
967 Normally, a string may appear multiple times.
968 .IP "\-\-rscroll"
969 This option changes the character used to mark truncated lines.
970 It may begin with a two-character attribute indicator like LESSBINFMT does.
971 If there is no attribute indicator, standout is used.
972 If set to "-", truncated lines are not marked.
973 .IP "\-\-save-marks"
974 Save marks in the history file, so marks are retained
975 across different invocations of \fIless\fP.
976 .IP "\-\-use-backslash"
977 This option changes the interpretations of options which follow this one.
978 After the \-\-use-backslash option, any backslash in an option string is
979 removed and the following character is taken literally.
980 This allows a dollar sign to be included in option strings.
981 .IP "\-\-wheel-lines=\fIn\fP"
982 Set the number of lines to scroll when the mouse wheel is scrolled
983 and the \-\-mouse or \-\-MOUSE option is in effect.
984 The default is 1 line.
985 .IP \-\-
986 A command line argument of "\-\-" marks the end of option arguments.
987 Any arguments following this are interpreted as filenames.
988 This can be useful when viewing a file whose name begins with a "\-" or "+".
989 .IP +
990 If a command line option begins with \fB+\fP,
991 the remainder of that option is taken to be an initial command to
992 .IR less .
993 For example, +G tells
994 .I less
995 to start at the end of the file rather than the beginning,
996 and +/xyz tells it to start at the first occurrence of "xyz" in the file.
997 As a special case, +<number> acts like +<number>g;
998 that is, it starts the display at the specified line number
999 (however, see the caveat under the "g" command above).
1000 If the option starts with ++, the initial command applies to
1001 every file being viewed, not just the first one.
1002 The + command described previously
1003 may also be used to set (or change) an initial command for every file.
1004
1005 .SH "LINE EDITING"
1006 When entering command line at the bottom of the screen
1007 (for example, a filename for the :e command,
1008 or the pattern for a search command),
1009 certain keys can be used to manipulate the command line.
1010 Most commands have an alternate form in [ brackets ] which can be used if
1011 a key does not exist on a particular keyboard.
1012 (Note that the forms beginning with ESC do not work
1013 in some MS-DOS and Windows systems because ESC is the line erase character.)
1014 Any of these special keys may be entered literally by preceding
1015 it with the "literal" character, either ^V or ^A.
1016 A backslash itself may also be entered literally by entering two backslashes.
1017 .IP "LEFTARROW [ ESC-h ]"
1018 Move the cursor one space to the left.
1019 .IP "RIGHTARROW [ ESC-l ]"
1020 Move the cursor one space to the right.
1021 .IP "^LEFTARROW [ ESC-b or ESC-LEFTARROW ]"
1022 (That is, CONTROL and LEFTARROW simultaneously.)
1023 Move the cursor one word to the left.
1024 .IP "^RIGHTARROW [ ESC-w or ESC-RIGHTARROW ]"
1025 (That is, CONTROL and RIGHTARROW simultaneously.)
1026 Move the cursor one word to the right.
1027 .IP "HOME [ ESC-0 ]"
1028 Move the cursor to the beginning of the line.
1029 .IP "END [ ESC-$ ]"
1030 Move the cursor to the end of the line.
1031 .IP "BACKSPACE"
1032 Delete the character to the left of the cursor,
1033 or cancel the command if the command line is empty.
1034 .IP "DELETE or [ ESC-x ]"
1035 Delete the character under the cursor.
1036 .IP "^BACKSPACE [ ESC-BACKSPACE ]"
1037 (That is, CONTROL and BACKSPACE simultaneously.)
1038 Delete the word to the left of the cursor.
1039 .IP "^DELETE [ ESC-X or ESC-DELETE ]"
1040 (That is, CONTROL and DELETE simultaneously.)
1041 Delete the word under the cursor.
1042 .IP "UPARROW [ ESC-k ]"
1043 Retrieve the previous command line.
1044 If you first enter some text and then press UPARROW,
1045 it will retrieve the previous command which begins with that text.
1046 .IP "DOWNARROW [ ESC-j ]"
1047 Retrieve the next command line.
1048 If you first enter some text and then press DOWNARROW,
1049 it will retrieve the next command which begins with that text.
1050 .IP "TAB"
1051 Complete the partial filename to the left of the cursor.
1052 If it matches more than one filename, the first match
1053 is entered into the command line.
1054 Repeated TABs will cycle thru the other matching filenames.
1055 If the completed filename is a directory, a "/" is appended to the filename.
1056 (On MS-DOS systems, a "\e" is appended.)
1057 The environment variable LESSSEPARATOR can be used to specify a
1058 different character to append to a directory name.
1059 .IP "BACKTAB [ ESC-TAB ]"
1060 Like, TAB, but cycles in the reverse direction thru the matching filenames.
1061 .IP "^L"
1062 Complete the partial filename to the left of the cursor.
1063 If it matches more than one filename, all matches are entered into
1064 the command line (if they fit).
1065 .IP "^U (Unix and OS/2) or ESC (MS-DOS)"
1066 Delete the entire command line,
1067 or cancel the command if the command line is empty.
1068 If you have changed your line-kill character in Unix to something
1069 other than ^U, that character is used instead of ^U.
1070 .IP "^G"
1071 Delete the entire command line and return to the main prompt.
1072
1073 .SH "KEY BINDINGS"
1074 You may define your own
1075 .I less
1076 commands by using the program
1077 .I lesskey
1078 (1)
1079 to create a lesskey file.
1080 This file specifies a set of command keys and an action
1081 associated with each key.
1082 You may also use
1083 .I lesskey
1084 to change the line-editing keys (see LINE EDITING),
1085 and to set environment variables.
1086 If the environment variable LESSKEY is set,
1087 .I less
1088 uses that as the name of the lesskey file.
1089 Otherwise,
1090 .I less
1091 looks in a standard place for the lesskey file:
1092 On Unix systems,
1093 .I less
1094 looks for a lesskey file called "$HOME/.less".
1095 On MS-DOS and Windows systems,
1096 .I less
1097 looks for a lesskey file called "$HOME/_less", and if it is not found there,
1098 then looks for a lesskey file called "_less" in any directory specified
1099 in the PATH environment variable.
1100 On OS/2 systems,
1101 .I less
1102 looks for a lesskey file called "$HOME/less.ini", and if it is not found,
1103 then looks for a lesskey file called "less.ini" in any directory specified
1104 in the INIT environment variable, and if it not found there,
1105 then looks for a lesskey file called "less.ini" in any directory specified
1106 in the PATH environment variable.
1107 See the
1108 .I lesskey
1109 manual page for more details.
1110 .P
1111 A system-wide lesskey file may also be set up to provide key bindings.
1112 If a key is defined in both a local lesskey file and in the
1113 system-wide file, key bindings in the local file take precedence over
1114 those in the system-wide file.
1115 If the environment variable LESSKEY_SYSTEM is set,
1116 .I less
1117 uses that as the name of the system-wide lesskey file.
1118 Otherwise,
1119 .I less
1120 looks in a standard place for the system-wide lesskey file:
1121 On Unix systems, the system-wide lesskey file is /usr/local/etc/sysless.
1122 (However, if
1123 .I less
1124 was built with a different sysconf directory than /usr/local/etc,
1125 that directory is where the sysless file is found.)
1126 On MS-DOS and Windows systems, the system-wide lesskey file is c:\e_sysless.
1127 On OS/2 systems, the system-wide lesskey file is c:\esysless.ini.
1128
1129 .SH "INPUT PREPROCESSOR"
1130 You may define an "input preprocessor" for
1131 .IR less .
1132 Before
1133 .I less
1134 opens a file, it first gives your input preprocessor a chance to modify the
1135 way the contents of the file are displayed.
1136 An input preprocessor is simply an executable program (or shell script),
1137 which writes the contents of the file to a different file,
1138 called the replacement file.
1139 The contents of the replacement file are then displayed
1140 in place of the contents of the original file.
1141 However, it will appear to the user as if the original file is opened;
1142 that is,
1143 .I less
1144 will display the original filename as the name of the current file.
1145 .PP
1146 An input preprocessor receives one command line argument, the original filename,
1147 as entered by the user.
1148 It should create the replacement file, and when finished,
1149 print the name of the replacement file to its standard output.
1150 If the input preprocessor does not output a replacement filename,
1151 .I less
1152 uses the original file, as normal.
1153 The input preprocessor is not called when viewing standard input.
1154 To set up an input preprocessor, set the LESSOPEN environment variable
1155 to a command line which will invoke your input preprocessor.
1156 This command line should include one occurrence of the string "%s",
1157 which will be replaced by the filename
1158 when the input preprocessor command is invoked.
1159 .PP
1160 When
1161 .I less
1162 closes a file opened in such a way, it will call another program,
1163 called the input postprocessor,
1164 which may perform any desired clean-up action (such as deleting the
1165 replacement file created by LESSOPEN).
1166 This program receives two command line arguments, the original filename
1167 as entered by the user, and the name of the replacement file.
1168 To set up an input postprocessor, set the LESSCLOSE environment variable
1169 to a command line which will invoke your input postprocessor.
1170 It may include two occurrences of the string "%s";
1171 the first is replaced with the original name of the file and
1172 the second with the name of the replacement file,
1173 which was output by LESSOPEN.
1174 .PP
1175 For example, on many Unix systems, these two scripts will allow you
1176 to keep files in compressed format, but still let
1177 .I less
1178 view them directly:
1179 .PP
1180 lessopen.sh:
1181 .br
1182         #! /bin/sh
1183 .br
1184         case "$1" in
1185 .br
1186         *.Z)    TEMPFILE=$(mktemp)
1187 .br
1188                 uncompress \-c $1  >$TEMPFILE  2>/dev/null
1189 .br
1190                 if [ \-s $TEMPFILE ]; then
1191 .br
1192                         echo $TEMPFILE
1193 .br
1194                 else
1195 .br
1196                         rm \-f $TEMPFILE
1197 .br
1198                 fi
1199 .br
1200                 ;;
1201 .br
1202         esac
1203 .PP
1204 lessclose.sh:
1205 .br
1206         #! /bin/sh
1207 .br
1208         rm $2
1209 .PP
1210 To use these scripts, put them both where they can be executed and
1211 set LESSOPEN="lessopen.sh\ %s", and
1212 LESSCLOSE="lessclose.sh\ %s\ %s".
1213 More complex LESSOPEN and LESSCLOSE scripts may be written
1214 to accept other types of compressed files, and so on.
1215 .PP
1216 It is also possible to set up an input preprocessor to
1217 pipe the file data directly to
1218 .IR less ,
1219 rather than putting the data into a replacement file.
1220 This avoids the need to decompress the entire file before
1221 starting to view it.
1222 An input preprocessor that works this way is called an input pipe.
1223 An input pipe, instead of writing the name of a replacement file on
1224 its standard output,
1225 writes the entire contents of the replacement file on its standard output.
1226 If the input pipe does not write any characters on its standard output,
1227 then there is no replacement file and
1228 .I less
1229 uses the original file, as normal.
1230 To use an input pipe,
1231 make the first character in the LESSOPEN environment variable a
1232 vertical bar (|) to signify that the input preprocessor is an input pipe.
1233 As with non-pipe input preprocessors, the command string must contain one
1234 occurrence of %s, which is replaced with the filename of the input file.
1235 .PP
1236 For example, on many Unix systems, this script will work like the
1237 previous example scripts:
1238 .PP
1239 lesspipe.sh:
1240 .br
1241         #! /bin/sh
1242 .br
1243         case "$1" in
1244 .br
1245         *.Z)    uncompress \-c $1  2>/dev/null
1246 .br
1247                 ;;
1248 .br
1249         *)      exit 1
1250 .br
1251                 ;;
1252 .br
1253         esac
1254 .br
1255         exit $?
1256 .br
1257 .PP
1258 To use this script, put it where it can be executed and set
1259 LESSOPEN="|lesspipe.sh %s".
1260 .PP
1261 Note that a preprocessor cannot output an empty file, since that
1262 is interpreted as meaning there is no replacement, and
1263 the original file is used.
1264 To avoid this, if LESSOPEN starts with two vertical bars,
1265 the exit status of the script becomes meaningful.
1266 If the exit status is zero, the output is considered to be
1267 replacement text, even if it is empty.
1268 If the exit status is nonzero, any output is ignored and the
1269 original file is used.
1270 For compatibility with previous versions of
1271 .IR less ,
1272 if LESSOPEN starts with only one vertical bar, the exit status
1273 of the preprocessor is ignored.
1274 .PP
1275 When an input pipe is used, a LESSCLOSE postprocessor can be used,
1276 but it is usually not necessary since there is no replacement file
1277 to clean up.
1278 In this case, the replacement file name passed to the LESSCLOSE
1279 postprocessor is "\-".
1280 .PP
1281 For compatibility with previous versions of
1282 .IR less ,
1283 the input preprocessor or pipe is not used if
1284 .I less
1285 is viewing standard input.
1286 However, if the first character of LESSOPEN is a dash (\-),
1287 the input preprocessor is used on standard input as well as other files.
1288 In this case, the dash is not considered to be part of
1289 the preprocessor command.
1290 If standard input is being viewed, the input preprocessor is passed
1291 a file name consisting of a single dash.
1292 Similarly, if the first two characters of LESSOPEN are vertical bar and dash
1293 (|\-) or two vertical bars and a dash (||\-),
1294 the input pipe is used on standard input as well as other files.
1295 Again, in this case the dash is not considered to be part of
1296 the input pipe command.
1297
1298 .SH "NATIONAL CHARACTER SETS"
1299 There are three types of characters in the input file:
1300 .IP "normal characters"
1301 can be displayed directly to the screen.
1302 .IP "control characters"
1303 should not be displayed directly, but are expected to be found
1304 in ordinary text files (such as backspace and tab).
1305 .IP "binary characters"
1306 should not be displayed directly and are not expected to be found
1307 in text files.
1308 .PP
1309 A "character set" is simply a description of which characters are to
1310 be considered normal, control, and binary.
1311 The LESSCHARSET environment variable may be used to select a character set.
1312 Possible values for LESSCHARSET are:
1313 .IP ascii
1314 BS, TAB, NL, CR, and formfeed are control characters,
1315 all chars with values between 32 and 126 are normal,
1316 and all others are binary.
1317 .IP iso8859
1318 Selects an ISO 8859 character set.
1319 This is the same as ASCII, except characters between 160 and 255 are
1320 treated as normal characters.
1321 .IP latin1
1322 Same as iso8859.
1323 .IP latin9
1324 Same as iso8859.
1325 .IP dos
1326 Selects a character set appropriate for MS-DOS.
1327 .IP ebcdic
1328 Selects an EBCDIC character set.
1329 .IP IBM-1047
1330 Selects an EBCDIC character set used by OS/390 Unix Services.
1331 This is the EBCDIC analogue of latin1.  You get similar results
1332 by setting either LESSCHARSET=IBM-1047 or LC_CTYPE=en_US
1333 in your environment.
1334 .IP koi8-r
1335 Selects a Russian character set.
1336 .IP next
1337 Selects a character set appropriate for NeXT computers.
1338 .IP utf-8
1339 Selects the UTF-8 encoding of the ISO 10646 character set.
1340 UTF-8 is special in that it supports multi-byte characters in the input file.
1341 It is the only character set that supports multi-byte characters.
1342 .IP windows
1343 Selects a character set appropriate for Microsoft Windows (cp 1251).
1344 .PP
1345 In rare cases, it may be desired to tailor
1346 .I less
1347 to use a character set other than the ones definable by LESSCHARSET.
1348 In this case, the environment variable LESSCHARDEF can be used
1349 to define a character set.
1350 It should be set to a string where each character in the string represents
1351 one character in the character set.
1352 The character "." is used for a normal character, "c" for control,
1353 and "b" for binary.
1354 A decimal number may be used for repetition.
1355 For example, "bccc4b.\&" would mean character 0 is binary,
1356 1, 2 and 3 are control, 4, 5, 6 and 7 are binary, and 8 is normal.
1357 All characters after the last are taken to be the same as the last,
1358 so characters 9 through 255 would be normal.
1359 (This is an example, and does not necessarily
1360 represent any real character set.)
1361 .PP
1362 This table shows the value of LESSCHARDEF which is equivalent
1363 to each of the possible values for LESSCHARSET:
1364 .sp
1365         ascii\  8bcccbcc18b95.b
1366 .br
1367         dos\ \ \        8bcccbcc12bc5b95.b.
1368 .br
1369         ebcdic  5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b
1370 .br
1371         \ \ \ \ \ \     9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b.
1372 .br
1373         IBM-1047        4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc
1374 .br
1375         \ \ \ \ \ \     191.b
1376 .br
1377         iso8859 8bcccbcc18b95.33b.
1378 .br
1379         koi8-r  8bcccbcc18b95.b128.
1380 .br
1381         latin1  8bcccbcc18b95.33b.
1382 .br
1383         next\ \         8bcccbcc18b95.bb125.bb
1384 .PP
1385 If neither LESSCHARSET nor LESSCHARDEF is set,
1386 but any of the strings "UTF-8", "UTF8", "utf-8" or "utf8"
1387 is found in the LC_ALL, LC_CTYPE or LANG
1388 environment variables, then the default character set is utf-8.
1389 .PP
1390 If that string is not found, but your system supports the
1391 .I setlocale
1392 interface,
1393 .I less
1394 will use setlocale to determine the character set.
1395 setlocale is controlled by setting the LANG or LC_CTYPE environment
1396 variables.
1397 .PP
1398 Finally, if the
1399 .I setlocale
1400 interface is also not available, the default character set is latin1.
1401 .PP
1402 Control and binary characters are displayed in standout (reverse video).
1403 Each such character is displayed in caret notation if possible
1404 (e.g.\& ^A for control-A).  Caret notation is used only if
1405 inverting the 0100 bit results in a normal printable character.
1406 Otherwise, the character is displayed as a hex number in angle brackets.
1407 This format can be changed by
1408 setting the LESSBINFMT environment variable.
1409 LESSBINFMT may begin with a "*" and one character to select
1410 the display attribute:
1411 "*k" is blinking, "*d" is bold, "*u" is underlined, "*s" is standout,
1412 and "*n" is normal.
1413 If LESSBINFMT does not begin with a "*", normal attribute is assumed.
1414 The remainder of LESSBINFMT is a string which may include one
1415 printf-style escape sequence (a % followed by x, X, o, d, etc.).
1416 For example, if LESSBINFMT is "*u[%x]", binary characters
1417 are displayed in underlined hexadecimal surrounded by brackets.
1418 The default if no LESSBINFMT is specified is "*s<%02X>".
1419 Warning: the result of expanding the character via LESSBINFMT must
1420 be less than 31 characters.
1421 .PP
1422 When the character set is utf-8, the LESSUTFBINFMT environment variable
1423 acts similarly to LESSBINFMT but it applies to Unicode code points
1424 that were successfully decoded but are unsuitable for display (e.g.,
1425 unassigned code points).
1426 Its default value is "<U+%04lX>".
1427 Note that LESSUTFBINFMT and LESSBINFMT share their display attribute
1428 setting ("*x") so specifying one will affect both;
1429 LESSUTFBINFMT is read after LESSBINFMT so its setting, if any,
1430 will have priority.
1431 Problematic octets in a UTF-8 file (octets of a truncated sequence,
1432 octets of a complete but non-shortest form sequence, illegal octets,
1433 and stray trailing octets)
1434 are displayed individually using LESSBINFMT so as to facilitate diagnostic
1435 of how the UTF-8 file is ill-formed.
1436
1437 .SH "PROMPTS"
1438 The \-P option allows you to tailor the prompt to your preference.
1439 The string given to the \-P option replaces the specified prompt string.
1440 Certain characters in the string are interpreted specially.
1441 The prompt mechanism is rather complicated to provide flexibility,
1442 but the ordinary user need not understand the details of constructing
1443 personalized prompt strings.
1444 .sp
1445 A percent sign followed by a single character is expanded
1446 according to what the following character is:
1447 .IP "%b\fIX\fP"
1448 Replaced by the byte offset into the current input file.
1449 The b is followed by a single character (shown as \fIX\fP above)
1450 which specifies the line whose byte offset is to be used.
1451 If the character is a "t", the byte offset of the top line in the
1452 display is used,
1453 an "m" means use the middle line,
1454 a "b" means use the bottom line,
1455 a "B" means use the line just after the bottom line,
1456 and a "j" means use the "target" line, as specified by the \-j option.
1457 .IP "%B"
1458 Replaced by the size of the current input file.
1459 .IP "%c"
1460 Replaced by the column number of the text appearing in the first
1461 column of the screen.
1462 .IP "%d\fIX\fP"
1463 Replaced by the page number of a line in the input file.
1464 The line to be used is determined by the \fIX\fP, as with the %b option.
1465 .IP "%D"
1466 Replaced by the number of pages in the input file,
1467 or equivalently, the page number of the last line in the input file.
1468 .IP "%E"
1469 Replaced by the name of the editor (from the VISUAL environment variable,
1470 or the EDITOR environment variable if VISUAL is not defined).
1471 See the discussion of the LESSEDIT feature below.
1472 .IP "%f"
1473 Replaced by the name of the current input file.
1474 .IP "%F"
1475 Replaced by the last component of the name of the current input file.
1476 .IP "%g"
1477 Replaced by the shell-escaped name of the current input file.
1478 This is useful when the expanded string will be used in a shell command,
1479 such as in LESSEDIT.
1480 .IP "%i"
1481 Replaced by the index of the current file in the list of
1482 input files.
1483 .IP "%l\fIX\fP"
1484 Replaced by the line number of a line in the input file.
1485 The line to be used is determined by the \fIX\fP, as with the %b option.
1486 .IP "%L"
1487 Replaced by the line number of the last line in the input file.
1488 .IP "%m"
1489 Replaced by the total number of input files.
1490 .IP "%p\fIX\fP"
1491 Replaced by the percent into the current input file, based on byte offsets.
1492 The line used is determined by the \fIX\fP as with the %b option.
1493 .IP "%P\fIX\fP"
1494 Replaced by the percent into the current input file, based on line numbers.
1495 The line used is determined by the \fIX\fP as with the %b option.
1496 .IP "%s"
1497 Same as %B.
1498 .IP "%t"
1499 Causes any trailing spaces to be removed.
1500 Usually used at the end of the string, but may appear anywhere.
1501 .IP "%T"
1502 Normally expands to the word "file".
1503 However if viewing files via a tags list using the \-t option, it expands to the word "tag".
1504 .IP "%x"
1505 Replaced by the name of the next input file in the list.
1506 .PP
1507 If any item is unknown (for example, the file size if input
1508 is a pipe), a question mark is printed instead.
1509 .PP
1510 The format of the prompt string can be changed
1511 depending on certain conditions.
1512 A question mark followed by a single character acts like an "IF":
1513 depending on the following character, a condition is evaluated.
1514 If the condition is true, any characters following the question mark
1515 and condition character, up to a period, are included in the prompt.
1516 If the condition is false, such characters are not included.
1517 A colon appearing between the question mark and the
1518 period can be used to establish an "ELSE": any characters between
1519 the colon and the period are included in the string if and only if
1520 the IF condition is false.
1521 Condition characters (which follow a question mark) may be:
1522 .IP "?a"
1523 True if any characters have been included in the prompt so far.
1524 .IP "?b\fIX\fP"
1525 True if the byte offset of the specified line is known.
1526 .IP "?B"
1527 True if the size of current input file is known.
1528 .IP "?c"
1529 True if the text is horizontally shifted (%c is not zero).
1530 .IP "?d\fIX\fP"
1531 True if the page number of the specified line is known.
1532 .IP "?e"
1533 True if at end-of-file.
1534 .IP "?f"
1535 True if there is an input filename
1536 (that is, if input is not a pipe).
1537 .IP "?l\fIX\fP"
1538 True if the line number of the specified line is known.
1539 .IP "?L"
1540 True if the line number of the last line in the file is known.
1541 .IP "?m"
1542 True if there is more than one input file.
1543 .IP "?n"
1544 True if this is the first prompt in a new input file.
1545 .IP "?p\fIX\fP"
1546 True if the percent into the current input file, based on byte offsets,
1547 of the specified line is known.
1548 .IP "?P\fIX\fP"
1549 True if the percent into the current input file, based on line numbers,
1550 of the specified line is known.
1551 .IP "?s"
1552 Same as "?B".
1553 .IP "?x"
1554 True if there is a next input file
1555 (that is, if the current input file is not the last one).
1556 .PP
1557 Any characters other than the special ones
1558 (question mark, colon, period, percent, and backslash)
1559 become literally part of the prompt.
1560 Any of the special characters may be included in the prompt literally
1561 by preceding it with a backslash.
1562 .PP
1563 Some examples:
1564 .sp
1565 ?f%f:Standard input.
1566 .sp
1567 This prompt prints the filename, if known;
1568 otherwise the string "Standard input".
1569 .sp
1570 ?f%f \&.?ltLine %lt:?pt%pt\e%:?btByte %bt:-...
1571 .sp
1572 This prompt would print the filename, if known.
1573 The filename is followed by the line number, if known,
1574 otherwise the percent if known, otherwise the byte offset if known.
1575 Otherwise, a dash is printed.
1576 Notice how each question mark has a matching period,
1577 and how the % after the %pt
1578 is included literally by escaping it with a backslash.
1579 .sp
1580 ?n?f%f\ .?m(%T %i of %m)\ ..?e(END)\ ?x-\ Next\e:\ %x..%t";
1581 .sp
1582 This prints the filename if this is the first prompt in a file,
1583 followed by the "file N of N" message if there is more
1584 than one input file.
1585 Then, if we are at end-of-file, the string "(END)" is printed
1586 followed by the name of the next file, if there is one.
1587 Finally, any trailing spaces are truncated.
1588 This is the default prompt.
1589 For reference, here are the defaults for
1590 the other two prompts (\-m and \-M respectively).
1591 Each is broken into two lines here for readability only.
1592 .nf
1593 .sp
1594 ?n?f%f\ .?m(%T\ %i\ of\ %m)\ ..?e(END)\ ?x-\ Next\e:\ %x.:
1595         ?pB%pB\e%:byte\ %bB?s/%s...%t
1596 .sp
1597 ?f%f\ .?n?m(%T\ %i\ of\ %m)\ ..?ltlines\ %lt-%lb?L/%L.\ :
1598         byte\ %bB?s/%s.\ .?e(END)\ ?x-\ Next\e:\ %x.:?pB%pB\e%..%t
1599 .sp
1600 .fi
1601 And here is the default message produced by the = command:
1602 .nf
1603 .sp
1604 ?f%f\ .?m(%T\ %i\ of\ %m)\ .?ltlines\ %lt-%lb?L/%L.\ .
1605         byte\ %bB?s/%s.\ ?e(END)\ :?pB%pB\e%..%t
1606 .fi
1607 .PP
1608 The prompt expansion features are also used for another purpose:
1609 if an environment variable LESSEDIT is defined, it is used
1610 as the command to be executed when the v command is invoked.
1611 The LESSEDIT string is expanded in the same way as the prompt strings.
1612 The default value for LESSEDIT is:
1613 .nf
1614 .sp
1615         %E\ ?lm+%lm.\ %g
1616 .sp
1617 .fi
1618 Note that this expands to the editor name, followed by a + and the
1619 line number, followed by the shell-escaped file name.
1620 If your editor does not accept the "+linenumber" syntax, or has other
1621 differences in invocation syntax, the LESSEDIT variable can be
1622 changed to modify this default.
1623
1624 .SH SECURITY
1625 When the environment variable LESSSECURE is set to 1,
1626 .I less
1627 runs in a "secure" mode.
1628 This means these features are disabled:
1629 .RS
1630 .IP "!"
1631 the shell command
1632 .IP "|"
1633 the pipe command
1634 .IP ":e"
1635 the examine command.
1636 .IP "v"
1637 the editing command
1638 .IP "s  \-o"
1639 log files
1640 .IP "\-k"
1641 use of lesskey files
1642 .IP "\-t"
1643 use of tags files
1644 .IP " "
1645 metacharacters in filenames, such as *
1646 .IP " "
1647 filename completion (TAB, ^L)
1648 .RE
1649 .PP
1650 Less can also be compiled to be permanently in "secure" mode.
1651
1652 .SH "COMPATIBILITY WITH MORE"
1653 If the environment variable LESS_IS_MORE is set to 1,
1654 or if the program is invoked via a file link named "more",
1655 .I less
1656 behaves (mostly) in conformance with the POSIX "more" command specification.
1657 In this mode, less behaves differently in these ways:
1658 .PP
1659 The \-e option works differently.
1660 If the \-e option is not set,
1661 .I less
1662 behaves as if the \-e option were set.
1663 If the \-e option is set,
1664 .I less
1665 behaves as if the \-E option were set.
1666 .PP
1667 The \-m option works differently.
1668 If the \-m option is not set, the medium prompt is used,
1669 and it is prefixed with the string "--More--".
1670 If the \-m option is set, the short prompt is used.
1671 .PP
1672 The \-n option acts like the \-z option.
1673 The normal behavior of the \-n option is unavailable in this mode.
1674 .PP
1675 The parameter to the \-p option is taken to be a
1676 .I less
1677 command rather than a search pattern.
1678 .PP
1679 The LESS environment variable is ignored,
1680 and the MORE environment variable is used in its place.
1681
1682 .SH "ENVIRONMENT VARIABLES"
1683 Environment variables may be specified either in the system environment
1684 as usual, or in a
1685 .I lesskey
1686 (1) file.
1687 If environment variables are defined in more than one place,
1688 variables defined in a local lesskey file take precedence over
1689 variables defined in the system environment, which take precedence
1690 over variables defined in the system-wide lesskey file.
1691 .IP COLUMNS
1692 Sets the number of columns on the screen.
1693 Takes precedence over the number of columns specified by the TERM variable.
1694 (But if you have a windowing system which supports TIOCGWINSZ or WIOCGETD,
1695 the window system's idea of the screen size takes precedence over the
1696 LINES and COLUMNS environment variables.)
1697 .IP EDITOR
1698 The name of the editor (used for the v command).
1699 .IP HOME
1700 Name of the user's home directory
1701 (used to find a lesskey file on Unix and OS/2 systems).
1702 .IP "HOMEDRIVE, HOMEPATH"
1703 Concatenation of the HOMEDRIVE and HOMEPATH environment variables is
1704 the name of the user's home directory if the HOME variable is not set
1705 (only in the Windows version).
1706 .IP INIT
1707 Name of the user's init directory (used to find a lesskey file on OS/2 systems).
1708 .IP LANG
1709 Language for determining the character set.
1710 .IP LC_CTYPE
1711 Language for determining the character set.
1712 .IP LESS
1713 Options which are passed to
1714 .I less
1715 automatically.
1716 .IP LESSANSIENDCHARS
1717 Characters which may end an ANSI color escape sequence
1718 (default "m").
1719 .IP LESSANSIMIDCHARS
1720 Characters which may appear between the ESC character and the
1721 end character in an ANSI color escape sequence
1722 (default "0123456789:;[?!"'#%()*+\ ".
1723 .IP LESSBINFMT
1724 Format for displaying non-printable, non-control characters.
1725 .IP LESSCHARDEF
1726 Defines a character set.
1727 .IP LESSCHARSET
1728 Selects a predefined character set.
1729 .IP LESSCLOSE
1730 Command line to invoke the (optional) input-postprocessor.
1731 .IP LESSECHO
1732 Name of the lessecho program (default "lessecho").
1733 The lessecho program is needed to expand metacharacters, such as * and ?,
1734 in filenames on Unix systems.
1735 .IP LESSEDIT
1736 Editor prototype string (used for the v command).
1737 See discussion under PROMPTS.
1738 .IP LESSGLOBALTAGS
1739 Name of the command used by the \-t option to find global tags.
1740 Normally should be set to "global" if your system has the
1741 .I global
1742 (1) command.  If not set, global tags are not used.
1743 .IP LESSHISTFILE
1744 Name of the history file used to remember search commands and
1745 shell commands between invocations of
1746 .IR less .
1747 If set to "\-" or "/dev/null", a history file is not used.
1748 The default is "$HOME/.lesshst" on Unix systems, "$HOME/_lesshst" on
1749 DOS and Windows systems, or "$HOME/lesshst.ini" or "$INIT/lesshst.ini"
1750 on OS/2 systems.
1751 .IP LESSHISTSIZE
1752 The maximum number of commands to save in the history file.
1753 The default is 100.
1754 .IP LESSKEY
1755 Name of the default lesskey(1) file.
1756 .IP LESSKEY_SYSTEM
1757 Name of the default system-wide lesskey(1) file.
1758 .IP LESSMETACHARS
1759 List of characters which are considered "metacharacters" by the shell.
1760 .IP LESSMETAESCAPE
1761 Prefix which less will add before each metacharacter in a
1762 command sent to the shell.
1763 If LESSMETAESCAPE is an empty string, commands containing
1764 metacharacters will not be passed to the shell.
1765 .IP LESSOPEN
1766 Command line to invoke the (optional) input-preprocessor.
1767 .IP LESSSECURE
1768 Runs less in "secure" mode.
1769 See discussion under SECURITY.
1770 .IP LESSSEPARATOR
1771 String to be appended to a directory name in filename completion.
1772 .IP LESSUTFBINFMT
1773 Format for displaying non-printable Unicode code points.
1774 .IP LESS_IS_MORE
1775 Emulate the
1776 .I more
1777 (1) command.
1778 .IP LINES
1779 Sets the number of lines on the screen.
1780 Takes precedence over the number of lines specified by the TERM variable.
1781 (But if you have a windowing system which supports TIOCGWINSZ or WIOCGETD,
1782 the window system's idea of the screen size takes precedence over the
1783 LINES and COLUMNS environment variables.)
1784 .IP MORE
1785 Options which are passed to
1786 .I less
1787 automatically when running in
1788 .I more
1789 compatible mode.
1790 .IP PATH
1791 User's search path (used to find a lesskey file
1792 on MS-DOS and OS/2 systems).
1793 .IP SHELL
1794 The shell used to execute the ! command, as well as to expand filenames.
1795 .IP TERM
1796 The type of terminal on which
1797 .I less
1798 is being run.
1799 .IP VISUAL
1800 The name of the editor (used for the v command).
1801
1802 .SH "SEE ALSO"
1803 lesskey(1)
1804
1805 .SH COPYRIGHT
1806 Copyright (C) 1984-2019  Mark Nudelman
1807 .PP
1808 less is part of the GNU project and is free software.
1809 You can redistribute it and/or modify it
1810 under the terms of either
1811 (1) the GNU General Public License as published by
1812 the Free Software Foundation; or (2) the Less License.
1813 See the file README in the less distribution for more details
1814 regarding redistribution.
1815 You should have received a copy of the GNU General Public License
1816 along with the source for less; see the file COPYING.
1817 If not, write to the Free Software Foundation, 59 Temple Place,
1818 Suite 330, Boston, MA  02111-1307, USA.
1819 You should also have received a copy of the Less License;
1820 see the file LICENSE.
1821 .PP
1822 less is distributed in the hope that it will be useful, but
1823 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
1824 or FITNESS FOR A PARTICULAR PURPOSE.
1825 See the GNU General Public License for more details.
1826
1827 .SH AUTHOR
1828 .PP
1829 Mark Nudelman
1830 .br
1831 Report bugs at https://github.com/gwsw/less/issues.
1832 .br
1833 For more information, see the less homepage at
1834 .br
1835 http://www.greenwoodsoftware.com/less.