]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/less/less.nro
bhnd(9): Fix a few mandoc related issues
[FreeBSD/FreeBSD.git] / contrib / less / less.nro
1 '\" t
2 .TH LESS 1 "Version 563: 13 Jun 2020"
3 .SH NAME
4 less \- opposite of more
5 .SH SYNOPSIS
6 .B "less \-?"
7 .br
8 .B "less \-\-help"
9 .br
10 .B "less \-V"
11 .br
12 .B "less \-\-version"
13 .br
14 .B "less [\-[+]aABcCdeEfFgGiIJKLmMnNqQrRsSuUVwWX~]"
15 .br
16 .B "     [\-b \fIspace\/\fP] [\-h \fIlines\/\fP] [\-j \fIline\/\fP] [\-k \fIkeyfile\/\fP]"
17 .br
18 .B "     [\-{oO} \fIlogfile\/\fP] [\-p \fIpattern\/\fP] [\-P \fIprompt\/\fP] [\-t \fItag\/\fP]"
19 .br
20 .B "     [\-T \fItagsfile\/\fP] [\-x \fItab\/\fP,...] [\-y \fIlines\/\fP] [\-[z] \fIlines\/\fP]"
21 .br
22 .B "     [\-# \fIshift\/\fP] [+[+]\fIcmd\/\fP] [\-\-] [\fIfilename\/\fP]..."
23 .br
24 (See the OPTIONS section for alternate option syntax with long option names.)
25 .
26 .SH DESCRIPTION
27 .I Less
28 is a program similar to
29 .IR more (1),
30 but which allows backward movement
31 in the file as well as forward movement.
32 Also,
33 .I less
34 does not have to read the entire input file before starting,
35 so with large input files it starts up faster than text editors like
36 .IR vi (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 .
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 .
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\ KB 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\ KB
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
567 (SGR mode).
568 .
569 .IP "\-e or \-\-quit-at-eof"
570 Causes
571 .I less
572 to automatically exit
573 the second time it reaches end-of-file.
574 By default, the only way to exit
575 .I less
576 is via the "q" command.
577 .IP "\-E or \-\-QUIT-AT-EOF"
578 Causes
579 .I less
580 to automatically exit the first time it reaches end-of-file.
581 .IP "\-f or \-\-force"
582 Forces non-regular files to be opened.
583 (A non-regular file is a directory or a device special file.)
584 Also suppresses the warning message when a binary file is opened.
585 By default,
586 .I less
587 will refuse to open non-regular files.
588 Note that some operating systems will not allow directories
589 to be read, even if \-f is set.
590 .IP "\-F or \-\-quit-if-one-screen"
591 Causes
592 .I less
593 to automatically exit
594 if the entire file can be displayed on the first screen.
595 .IP "\-g or \-\-hilite-search"
596 Normally,
597 .I less
598 will highlight ALL strings which match the last search command.
599 The \-g option changes this behavior to highlight only the particular string
600 which was found by the last search command.
601 This can cause
602 .I less
603 to run somewhat faster than the default.
604 .IP "\-G or \-\-HILITE-SEARCH"
605 The \-G option suppresses all highlighting of strings found by search commands.
606 .IP "\-h\fIn\fP or \-\-max-back-scroll=\fIn\fP"
607 Specifies a maximum number of lines to scroll backward.
608 If it is necessary to scroll backward more than \fIn\fP lines,
609 the screen is repainted in a forward direction instead.
610 (If the terminal does not have the ability to scroll
611 backward, \-h0 is implied.)
612 .IP "\-i or \-\-ignore-case"
613 Causes searches to ignore case; that is,
614 uppercase and lowercase are considered identical.
615 This option is ignored if any uppercase letters
616 appear in the search pattern;
617 in other words,
618 if a pattern contains uppercase letters, then that search does not ignore case.
619 .IP "\-I or \-\-IGNORE-CASE"
620 Like \-i, but searches ignore case even if
621 the pattern contains uppercase letters.
622 .IP "\-j\fIn\fP or \-\-jump-target=\fIn\fP"
623 Specifies a line on the screen where the "target" line
624 is to be positioned.
625 The target line is the line specified by any command to
626 search for a pattern, jump to a line number,
627 jump to a file percentage or jump to a tag.
628 The screen line may be specified by a number: the top line on the screen
629 is 1, the next is 2, and so on.
630 The number may be negative to specify a line relative to the bottom
631 of the screen: the bottom line on the screen is \-1, the second
632 to the bottom is \-2, and so on.
633 Alternately, the screen line may be specified as a fraction of the height
634 of the screen, starting with a decimal point: \&.5 is in the middle of the
635 screen, \&.3 is three tenths down from the first line, and so on.
636 If the line is specified as a fraction, the actual line number
637 is recalculated if the terminal window is resized, so that the
638 target line remains at the specified fraction of the screen height.
639 If any form of the \-j option is used,
640 repeated forward searches (invoked with "n" or "N")
641 begin at the line immediately after the target line,
642 and repeated backward searches begin at the target line,
643 unless changed by \-a or \-A.
644 For example, if "\-j4" is used, the target line is the
645 fourth line on the screen, so forward searches begin at the fifth line
646 on the screen.
647 However nonrepeated searches (invoked with "/" or "?")
648 always begin at the start or end of the current screen respectively.
649 .IP "\-J or \-\-status-column"
650 Displays a status column at the left edge of the screen.
651 The status column shows the lines that matched the current search,
652 and any lines that are marked (via the m or M command).
653 The status column is also used if the \-w or \-W option is in effect.
654 .IP "\-k\fIfilename\fP or \-\-lesskey-file=\fIfilename\fP"
655 Causes
656 .I less
657 to open and interpret the named file as a
658 .IR lesskey (1)
659 file.
660 Multiple \-k options may be specified.
661 If the LESSKEY or LESSKEY_SYSTEM environment variable is set, or
662 if a lesskey file is found in a standard place (see KEY BINDINGS),
663 it is also used as a
664 .I lesskey
665 file.
666 .IP "\-K or \-\-quit-on-intr"
667 Causes
668 .I less
669 to exit immediately (with status 2)
670 when an interrupt character (usually ^C) is typed.
671 Normally, an interrupt character causes
672 .I less
673 to stop whatever it is doing and return to its command prompt.
674 Note that use of this option makes it impossible to return to the
675 command prompt from the "F" command.
676 .IP "\-L or \-\-no-lessopen"
677 Ignore the LESSOPEN environment variable
678 (see the INPUT PREPROCESSOR section below).
679 This option can be set from within \fIless\fP,
680 but it will apply only to files opened subsequently, not to the
681 file which is currently open.
682 .IP "\-m or \-\-long-prompt"
683 Causes
684 .I less
685 to prompt verbosely (like \fImore\fP),
686 with the percent into the file.
687 By default,
688 .I less
689 prompts with a colon.
690 .IP "\-M or \-\-LONG-PROMPT"
691 Causes
692 .I less
693 to prompt even more verbosely than
694 .IR more .
695 .IP "\-n or \-\-line-numbers"
696 Suppresses line numbers.
697 The default (to use line numbers) may cause
698 .I less
699 to run more slowly in some cases, especially with a very large input file.
700 Suppressing line numbers with the \-n option will avoid this problem.
701 Using line numbers means: the line number will be displayed in the verbose
702 prompt and in the = command,
703 and the v command will pass the current line number to the editor
704 (see also the discussion of LESSEDIT in PROMPTS below).
705 .IP "\-N or \-\-LINE-NUMBERS"
706 Causes a line number to be displayed at the beginning of
707 each line in the display.
708 .IP "\-o\fIfilename\fP or \-\-log-file=\fIfilename\fP"
709 Causes
710 .I less
711 to copy its input to the named file as it is being viewed.
712 This applies only when the input file is a pipe,
713 not an ordinary file.
714 If the file already exists,
715 .I less
716 will ask for confirmation before overwriting it.
717 .IP "\-O\fIfilename\fP or \-\-LOG-FILE=\fIfilename\fP"
718 The \-O option is like \-o, but it will overwrite an existing
719 file without asking for confirmation.
720 .sp
721 If no log file has been specified,
722 the \-o and \-O options can be used from within
723 .I less
724 to specify a log file.
725 Without a file name, they will simply report the name of the log file.
726 The "s" command is equivalent to specifying \-o from within
727 .IR less .
728 .IP "\-p\fIpattern\fP or \-\-pattern=\fIpattern\fP"
729 The \-p option on the command line is equivalent to
730 specifying +/\fIpattern\fP;
731 that is, it tells
732 .I less
733 to start at the first occurrence of \fIpattern\fP in the file.
734 .IP "\-P\fIprompt\fP or \-\-prompt=\fIprompt\fP"
735 Provides a way to tailor the three prompt
736 styles to your own preference.
737 This option would normally be put in the LESS environment
738 variable, rather than being typed in with each
739 .I less
740 command.
741 Such an option must either be the last option in the LESS variable,
742 or be terminated by a dollar sign.
743  \-Ps followed by a string changes the default (short) prompt
744 to that string.
745  \-Pm changes the medium (\-m) prompt.
746  \-PM changes the long (\-M) prompt.
747  \-Ph changes the prompt for the help screen.
748  \-P= changes the message printed by the = command.
749  \-Pw changes the message printed while waiting for data (in the F command).
750 .sp 1
751 All prompt strings consist of a sequence of
752 letters and special escape sequences.
753 See the section on PROMPTS for more details.
754 .IP "\-q or \-\-quiet or \-\-silent"
755 Causes moderately "quiet" operation:
756 the terminal bell is not rung
757 if an attempt is made to scroll past the end of the file
758 or before the beginning of the file.
759 If the terminal has a "visual bell", it is used instead.
760 The bell will be rung on certain other errors,
761 such as typing an invalid character.
762 The default is to ring the terminal bell in all such cases.
763 .IP "\-Q or \-\-QUIET or \-\-SILENT"
764 Causes totally "quiet" operation:
765 the terminal bell is never rung.
766 If the terminal has a "visual bell", it is used in all cases
767 where the terminal bell would have been rung.
768 .IP "\-r or \-\-raw-control-chars"
769 Causes "raw" control characters to be displayed.
770 The default is to display control characters using the caret notation;
771 for example, a control-A (octal 001) is displayed as "^A".
772 Warning: when the \-r option is used,
773 .I less
774 cannot keep track of the actual appearance of the screen
775 (since this depends on how the screen responds to
776 each type of control character).
777 Thus, various display problems may result,
778 such as long lines being split in the wrong place.
779 .IP "\-R or \-\-RAW-CONTROL-CHARS"
780 Like \-r, but only ANSI "color" escape sequences are output in "raw" form.
781 Unlike \-r, the screen appearance is maintained correctly in most cases.
782 ANSI "color" escape sequences are sequences of the form:
783 .sp
784         ESC [ \&...\& m
785 .sp
786 where the "...\&" is zero or more color specification characters
787 For the purpose of keeping track of screen appearance,
788 ANSI color escape sequences are assumed to not move the cursor.
789 You can make
790 .I less
791 think that characters other than "m" can end ANSI color escape sequences
792 by setting the environment variable LESSANSIENDCHARS to the list of
793 characters which can end a color escape sequence.
794 And you can make
795 .I less
796 think that characters other than the standard ones may appear between
797 the ESC and the m by setting the environment variable LESSANSIMIDCHARS
798 to the list of characters which can appear.
799 .IP "\-s or \-\-squeeze-blank-lines"
800 Causes consecutive blank lines to be squeezed into a single blank line.
801 This is useful when viewing
802 .I nroff
803 output.
804 .IP "\-S or \-\-chop-long-lines"
805 Causes lines longer than the screen width to be
806 chopped (truncated) rather than wrapped.
807 That is, the portion of a long line that does not fit in
808 the screen width is not displayed until you press RIGHT-ARROW.
809 The default is to wrap long lines; that is, display the remainder
810 on the next line.
811 .IP "\-t\fItag\fP or \-\-tag=\fItag\fP"
812 The \-t option, followed immediately by a TAG,
813 will edit the file containing that tag.
814 For this to work, tag information must be available;
815 for example, there may be a file in the current directory called "tags",
816 which was previously built by
817 .IR ctags (1)
818 or an equivalent command.
819 If the environment variable LESSGLOBALTAGS is set, it is taken to be
820 the name of a command compatible with
821 .IR global (1),
822 and that command is executed to find the tag.
823 (See http://www.gnu.org/software/global/global.html).
824 The \-t option may also be specified from within
825 .I less
826 (using the \- command) as a way of examining a new file.
827 The command ":t" is equivalent to specifying \-t from within
828 .IR less .
829 .IP "\-T\fItagsfile\fP or \-\-tag-file=\fItagsfile\fP"
830 Specifies a tags file to be used instead of "tags".
831 .IP "\-u or \-\-underline-special"
832 Causes backspaces and carriage returns to be treated as printable characters;
833 that is, they are sent to the terminal when they appear in the input.
834 .IP "\-U or \-\-UNDERLINE-SPECIAL"
835 Causes backspaces, tabs, carriage returns and "formatting characters"
836 (as defined by Unicode) to be treated as control characters;
837 that is, they are handled as specified by the \-r option.
838 .sp
839 By default, if neither \-u nor \-U is given,
840 backspaces which appear adjacent to an underscore character
841 are treated specially:
842 the underlined text is displayed
843 using the terminal's hardware underlining capability.
844 Also, backspaces which appear between two identical characters
845 are treated specially:
846 the overstruck text is printed
847 using the terminal's hardware boldface capability.
848 Other backspaces are deleted, along with the preceding character.
849 Carriage returns immediately followed by a newline are deleted.
850 Other carriage returns are handled as specified by the \-r option.
851 Text which is overstruck or underlined can be searched for
852 if neither \-u nor \-U is in effect.
853 .IP "\-V or \-\-version"
854 Displays the version number of
855 .IR less .
856 .IP "\-w or \-\-hilite-unread"
857 Temporarily highlights the first "new" line after a forward movement
858 of a full page.
859 The first "new" line is the line immediately following the line previously
860 at the bottom of the screen.
861 Also highlights the target line after a g or p command.
862 The highlight is removed at the next command which causes movement.
863 The entire line is highlighted, unless the \-J option is in effect,
864 in which case only the status column is highlighted.
865 .IP "\-W or \-\-HILITE-UNREAD"
866 Like \-w, but temporarily highlights the first new line after any
867 forward movement command larger than one line.
868 .IP "\-x\fIn\fP,...\& or \-\-tabs=\fIn\fP,..."
869 Sets tab stops.
870 If only one \fIn\fP is specified, tab stops are set at multiples of \fIn\fP.
871 If multiple values separated by commas are specified, tab stops
872 are set at those positions, and then continue with the same spacing as the
873 last two.
874 For example, \fI\-x9,17\fP will set tabs at positions 9, 17, 25, 33, etc.
875 The default for \fIn\fP is 8.
876 .IP "\-X or \-\-no-init"
877 Disables sending the termcap initialization and deinitialization strings
878 to the terminal.
879 This is sometimes desirable if the deinitialization string does
880 something unnecessary, like clearing the screen.
881 .IP "\-y\fIn\fP or \-\-max-forw-scroll=\fIn\fP"
882 Specifies a maximum number of lines to scroll forward.
883 If it is necessary to scroll forward more than \fIn\fP lines,
884 the screen is repainted instead.
885 The \-c or \-C option may be used to repaint from the top of
886 the screen if desired.
887 By default, any forward movement causes scrolling.
888 .IP "\-z\fIn\fP or \-\-window=\fIn\fP or \-\fIn\fP"
889 Changes the default scrolling window size to \fIn\fP lines.
890 The default is one screenful.
891 The z and w commands can also be used to change the window size.
892 The "z" may be omitted for compatibility with some versions of
893 .IR more .
894 If the number
895 .I n
896 is negative, it indicates
897 .I n
898 lines less than the current screen size.
899 For example, if the screen is 24 lines, \fI\-z\-4\fP sets the
900 scrolling window to 20 lines.  If the screen is resized to 40 lines,
901 the scrolling window automatically changes to 36 lines.
902 .IP "\-\(dq\fIcc\fP\ or\ \-\-quotes=\fIcc\fP"
903 Changes the filename quoting character.
904 This may be necessary if you are trying to name a file
905 which contains both spaces and quote characters.
906 Followed by a single character, this changes the quote character to that
907 character.
908 Filenames containing a space should then be surrounded by that character
909 rather than by double quotes.
910 Followed by two characters, changes the open quote to the first character,
911 and the close quote to the second character.
912 Filenames containing a space should then be preceded by the open quote
913 character and followed by the close quote character.
914 Note that even after the quote characters are changed, this option
915 remains \-" (a dash followed by a double quote).
916 .IP "\-~ or \-\-tilde"
917 Normally lines after end of file are displayed as a single tilde (~).
918 This option causes lines after end of file to be displayed as blank lines.
919 .IP "\-# or \-\-shift"
920 Specifies the default number of positions to scroll horizontally
921 in the RIGHTARROW and LEFTARROW commands.
922 If the number specified is zero, it sets the default number of
923 positions to one half of the screen width.
924 Alternately, the number may be specified as a fraction of the width
925 of the screen, starting with a decimal point: \&.5 is half of the
926 screen width, \&.3 is three tenths of the screen width, and so on.
927 If the number is specified as a fraction, the actual number of
928 scroll positions is recalculated if the terminal window is resized,
929 so that the actual scroll remains at the specified fraction
930 of the screen width.
931 .IP "\-\-follow-name"
932 Normally, if the input file is renamed while an F command is executing,
933 .I less
934 will continue to display the contents of the original file despite
935 its name change.
936 If \-\-follow-name is specified, during an F command
937 .I less
938 will periodically attempt to reopen the file by name.
939 If the reopen succeeds and the file is a different file from the original
940 (which means that a new file has been created
941 with the same name as the original (now renamed) file),
942 .I less
943 will display the contents of that new file.
944 .IP "\-\-mouse"
945 Enables mouse input:
946 scrolling the mouse wheel down moves forward in the file,
947 scrolling the mouse wheel up moves backwards in the file,
948 and clicking the mouse sets the "#" mark to the line
949 where the mouse is clicked.
950 The number of lines to scroll when the wheel is moved
951 can be set by the \-\-wheel-lines option.
952 Mouse input works only on terminals which support X11 mouse reporting,
953 and on the Windows version of
954 .IR less .
955 .IP "\-\-MOUSE"
956 Like \-\-mouse, except the direction scrolled
957 on mouse wheel movement is reversed.
958 .IP "\-\-no-keypad"
959 Disables sending the keypad initialization and deinitialization strings
960 to the terminal.
961 This is sometimes useful if the keypad strings make the numeric
962 keypad behave in an undesirable manner.
963 .IP "\-\-no-histdups"
964 This option changes the behavior so that if a search string or
965 file name is typed in, and the same string is already in the history list,
966 the existing copy is removed from the history list before the new one is added.
967 Thus, a given string will appear only once in the history list.
968 Normally, a string may appear multiple times.
969 .IP "\-\-rscroll"
970 This option changes the character used to mark truncated lines.
971 It may begin with a two-character attribute indicator like LESSBINFMT does.
972 If there is no attribute indicator, standout is used.
973 If set to "\-", truncated lines are not marked.
974 .IP "\-\-save-marks"
975 Save marks in the history file, so marks are retained
976 across different invocations of \fIless\fP.
977 .IP "\-\-use-backslash"
978 This option changes the interpretations of options which follow this one.
979 After the \-\-use-backslash option, any backslash in an option string is
980 removed and the following character is taken literally.
981 This allows a dollar sign to be included in option strings.
982 .IP "\-\-wheel-lines=\fIn\fP"
983 Set the number of lines to scroll when the mouse wheel is scrolled
984 and the \-\-mouse or \-\-MOUSE option is in effect.
985 The default is 1 line.
986 .IP \-\-
987 A command line argument of "\-\-" marks the end of option arguments.
988 Any arguments following this are interpreted as filenames.
989 This can be useful when viewing a file whose name begins with a "\-" or "+".
990 .IP +
991 If a command line option begins with \fB+\fP,
992 the remainder of that option is taken to be an initial command to
993 .IR less .
994 For example, +G tells
995 .I less
996 to start at the end of the file rather than the beginning,
997 and +/xyz tells it to start at the first occurrence of "xyz" in the file.
998 As a special case, +<number> acts like +<number>g;
999 that is, it starts the display at the specified line number
1000 (however, see the caveat under the "g" command above).
1001 If the option starts with ++, the initial command applies to
1002 every file being viewed, not just the first one.
1003 The + command described previously
1004 may also be used to set (or change) an initial command for every file.
1005 .
1006 .SH "LINE EDITING"
1007 When entering command line at the bottom of the screen
1008 (for example, a filename for the :e command,
1009 or the pattern for a search command),
1010 certain keys can be used to manipulate the command line.
1011 Most commands have an alternate form in [ brackets ] which can be used if
1012 a key does not exist on a particular keyboard.
1013 (Note that the forms beginning with ESC do not work
1014 in some MS-DOS and Windows systems because ESC is the line erase character.)
1015 Any of these special keys may be entered literally by preceding
1016 it with the "literal" character, either ^V or ^A.
1017 A backslash itself may also be entered literally by entering two backslashes.
1018 .IP "LEFTARROW [ ESC-h ]"
1019 Move the cursor one space to the left.
1020 .IP "RIGHTARROW [ ESC-l ]"
1021 Move the cursor one space to the right.
1022 .IP "^LEFTARROW [ ESC-b or ESC-LEFTARROW ]"
1023 (That is, CONTROL and LEFTARROW simultaneously.)
1024 Move the cursor one word to the left.
1025 .IP "^RIGHTARROW [ ESC-w or ESC-RIGHTARROW ]"
1026 (That is, CONTROL and RIGHTARROW simultaneously.)
1027 Move the cursor one word to the right.
1028 .IP "HOME [ ESC-0 ]"
1029 Move the cursor to the beginning of the line.
1030 .IP "END [ ESC-$ ]"
1031 Move the cursor to the end of the line.
1032 .IP "BACKSPACE"
1033 Delete the character to the left of the cursor,
1034 or cancel the command if the command line is empty.
1035 .IP "DELETE or [ ESC-x ]"
1036 Delete the character under the cursor.
1037 .IP "^BACKSPACE [ ESC-BACKSPACE ]"
1038 (That is, CONTROL and BACKSPACE simultaneously.)
1039 Delete the word to the left of the cursor.
1040 .IP "^DELETE [ ESC-X or ESC-DELETE ]"
1041 (That is, CONTROL and DELETE simultaneously.)
1042 Delete the word under the cursor.
1043 .IP "UPARROW [ ESC-k ]"
1044 Retrieve the previous command line.
1045 If you first enter some text and then press UPARROW,
1046 it will retrieve the previous command which begins with that text.
1047 .IP "DOWNARROW [ ESC-j ]"
1048 Retrieve the next command line.
1049 If you first enter some text and then press DOWNARROW,
1050 it will retrieve the next command which begins with that text.
1051 .IP "TAB"
1052 Complete the partial filename to the left of the cursor.
1053 If it matches more than one filename, the first match
1054 is entered into the command line.
1055 Repeated TABs will cycle thru the other matching filenames.
1056 If the completed filename is a directory, a "/" is appended to the filename.
1057 (On MS-DOS systems, a "\e" is appended.)
1058 The environment variable LESSSEPARATOR can be used to specify a
1059 different character to append to a directory name.
1060 .IP "BACKTAB [ ESC-TAB ]"
1061 Like, TAB, but cycles in the reverse direction thru the matching filenames.
1062 .IP "^L"
1063 Complete the partial filename to the left of the cursor.
1064 If it matches more than one filename, all matches are entered into
1065 the command line (if they fit).
1066 .IP "^U (Unix and OS/2) or ESC (MS-DOS)"
1067 Delete the entire command line,
1068 or cancel the command if the command line is empty.
1069 If you have changed your line-kill character in Unix to something
1070 other than ^U, that character is used instead of ^U.
1071 .IP "^G"
1072 Delete the entire command line and return to the main prompt.
1073 .
1074 .SH "KEY BINDINGS"
1075 You may define your own
1076 .I less
1077 commands by using the program
1078 .IR lesskey (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 .
1365 .RS 5m
1366 .TS
1367 l l.
1368 ascii   8bcccbcc18b95.b
1369 dos     8bcccbcc12bc5b95.b.
1370 ebcdic  5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b
1371         9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b.
1372 IBM-1047        4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc
1373         191.b
1374 iso8859 8bcccbcc18b95.33b.
1375 koi8-r  8bcccbcc18b95.b128.
1376 latin1  8bcccbcc18b95.33b.
1377 next    8bcccbcc18b95.bb125.bb
1378 .TE
1379 .RE
1380 .PP
1381 If neither LESSCHARSET nor LESSCHARDEF is set,
1382 but any of the strings "UTF-8", "UTF8", "utf-8" or "utf8"
1383 is found in the LC_ALL, LC_CTYPE or LANG
1384 environment variables, then the default character set is utf-8.
1385 .PP
1386 If that string is not found, but your system supports the
1387 .I setlocale
1388 interface,
1389 .I less
1390 will use setlocale to determine the character set.
1391 setlocale is controlled by setting the LANG or LC_CTYPE environment
1392 variables.
1393 .PP
1394 Finally, if the
1395 .I setlocale
1396 interface is also not available, the default character set is latin1.
1397 .PP
1398 Control and binary characters are displayed in standout (reverse video).
1399 Each such character is displayed in caret notation if possible
1400 (e.g.\& ^A for control-A).  Caret notation is used only if
1401 inverting the 0100 bit results in a normal printable character.
1402 Otherwise, the character is displayed as a hex number in angle brackets.
1403 This format can be changed by
1404 setting the LESSBINFMT environment variable.
1405 LESSBINFMT may begin with a "*" and one character to select
1406 the display attribute:
1407 "*k" is blinking, "*d" is bold, "*u" is underlined, "*s" is standout,
1408 and "*n" is normal.
1409 If LESSBINFMT does not begin with a "*", normal attribute is assumed.
1410 The remainder of LESSBINFMT is a string which may include one
1411 printf-style escape sequence (a % followed by x, X, o, d, etc.).
1412 For example, if LESSBINFMT is "*u[%x]", binary characters
1413 are displayed in underlined hexadecimal surrounded by brackets.
1414 The default if no LESSBINFMT is specified is "*s<%02X>".
1415 Warning: the result of expanding the character via LESSBINFMT must
1416 be less than 31 characters.
1417 .PP
1418 When the character set is utf-8, the LESSUTFBINFMT environment variable
1419 acts similarly to LESSBINFMT but it applies to Unicode code points
1420 that were successfully decoded but are unsuitable for display (e.g.,
1421 unassigned code points).
1422 Its default value is "<U+%04lX>".
1423 Note that LESSUTFBINFMT and LESSBINFMT share their display attribute
1424 setting ("*x") so specifying one will affect both;
1425 LESSUTFBINFMT is read after LESSBINFMT so its setting, if any,
1426 will have priority.
1427 Problematic octets in a UTF-8 file (octets of a truncated sequence,
1428 octets of a complete but non-shortest form sequence, invalid octets,
1429 and stray trailing octets)
1430 are displayed individually using LESSBINFMT so as to facilitate diagnostic
1431 of how the UTF-8 file is ill-formed.
1432 .
1433 .SH "PROMPTS"
1434 The \-P option allows you to tailor the prompt to your preference.
1435 The string given to the \-P option replaces the specified prompt string.
1436 Certain characters in the string are interpreted specially.
1437 The prompt mechanism is rather complicated to provide flexibility,
1438 but the ordinary user need not understand the details of constructing
1439 personalized prompt strings.
1440 .sp
1441 A percent sign followed by a single character is expanded
1442 according to what the following character is:
1443 .IP "%b\fIX\fP"
1444 Replaced by the byte offset into the current input file.
1445 The b is followed by a single character (shown as \fIX\fP above)
1446 which specifies the line whose byte offset is to be used.
1447 If the character is a "t", the byte offset of the top line in the
1448 display is used,
1449 an "m" means use the middle line,
1450 a "b" means use the bottom line,
1451 a "B" means use the line just after the bottom line,
1452 and a "j" means use the "target" line, as specified by the \-j option.
1453 .IP "%B"
1454 Replaced by the size of the current input file.
1455 .IP "%c"
1456 Replaced by the column number of the text appearing in the first
1457 column of the screen.
1458 .IP "%d\fIX\fP"
1459 Replaced by the page number of a line in the input file.
1460 The line to be used is determined by the \fIX\fP, as with the %b option.
1461 .IP "%D"
1462 Replaced by the number of pages in the input file,
1463 or equivalently, the page number of the last line in the input file.
1464 .IP "%E"
1465 Replaced by the name of the editor (from the VISUAL environment variable,
1466 or the EDITOR environment variable if VISUAL is not defined).
1467 See the discussion of the LESSEDIT feature below.
1468 .IP "%f"
1469 Replaced by the name of the current input file.
1470 .IP "%F"
1471 Replaced by the last component of the name of the current input file.
1472 .IP "%g"
1473 Replaced by the shell-escaped name of the current input file.
1474 This is useful when the expanded string will be used in a shell command,
1475 such as in LESSEDIT.
1476 .IP "%i"
1477 Replaced by the index of the current file in the list of
1478 input files.
1479 .IP "%l\fIX\fP"
1480 Replaced by the line number of a line in the input file.
1481 The line to be used is determined by the \fIX\fP, as with the %b option.
1482 .IP "%L"
1483 Replaced by the line number of the last line in the input file.
1484 .IP "%m"
1485 Replaced by the total number of input files.
1486 .IP "%p\fIX\fP"
1487 Replaced by the percent into the current input file, based on byte offsets.
1488 The line used is determined by the \fIX\fP as with the %b option.
1489 .IP "%P\fIX\fP"
1490 Replaced by the percent into the current input file, based on line numbers.
1491 The line used is determined by the \fIX\fP as with the %b option.
1492 .IP "%s"
1493 Same as %B.
1494 .IP "%t"
1495 Causes any trailing spaces to be removed.
1496 Usually used at the end of the string, but may appear anywhere.
1497 .IP "%T"
1498 Normally expands to the word "file".
1499 However if viewing files via a tags list using the \-t option,
1500 it expands to the word "tag".
1501 .IP "%x"
1502 Replaced by the name of the next input file in the list.
1503 .PP
1504 If any item is unknown (for example, the file size if input
1505 is a pipe), a question mark is printed instead.
1506 .PP
1507 The format of the prompt string can be changed
1508 depending on certain conditions.
1509 A question mark followed by a single character acts like an "IF":
1510 depending on the following character, a condition is evaluated.
1511 If the condition is true, any characters following the question mark
1512 and condition character, up to a period, are included in the prompt.
1513 If the condition is false, such characters are not included.
1514 A colon appearing between the question mark and the
1515 period can be used to establish an "ELSE": any characters between
1516 the colon and the period are included in the string if and only if
1517 the IF condition is false.
1518 Condition characters (which follow a question mark) may be:
1519 .IP "?a"
1520 True if any characters have been included in the prompt so far.
1521 .IP "?b\fIX\fP"
1522 True if the byte offset of the specified line is known.
1523 .IP "?B"
1524 True if the size of current input file is known.
1525 .IP "?c"
1526 True if the text is horizontally shifted (%c is not zero).
1527 .IP "?d\fIX\fP"
1528 True if the page number of the specified line is known.
1529 .IP "?e"
1530 True if at end-of-file.
1531 .IP "?f"
1532 True if there is an input filename
1533 (that is, if input is not a pipe).
1534 .IP "?l\fIX\fP"
1535 True if the line number of the specified line is known.
1536 .IP "?L"
1537 True if the line number of the last line in the file is known.
1538 .IP "?m"
1539 True if there is more than one input file.
1540 .IP "?n"
1541 True if this is the first prompt in a new input file.
1542 .IP "?p\fIX\fP"
1543 True if the percent into the current input file, based on byte offsets,
1544 of the specified line is known.
1545 .IP "?P\fIX\fP"
1546 True if the percent into the current input file, based on line numbers,
1547 of the specified line is known.
1548 .IP "?s"
1549 Same as "?B".
1550 .IP "?x"
1551 True if there is a next input file
1552 (that is, if the current input file is not the last one).
1553 .PP
1554 Any characters other than the special ones
1555 (question mark, colon, period, percent, and backslash)
1556 become literally part of the prompt.
1557 Any of the special characters may be included in the prompt literally
1558 by preceding it with a backslash.
1559 .PP
1560 Some examples:
1561 .sp
1562 ?f%f:Standard input.
1563 .sp
1564 This prompt prints the filename, if known;
1565 otherwise the string "Standard input".
1566 .sp
1567 ?f%f \&.?ltLine %lt:?pt%pt\e%:?btByte %bt:-...
1568 .sp
1569 This prompt would print the filename, if known.
1570 The filename is followed by the line number, if known,
1571 otherwise the percent if known, otherwise the byte offset if known.
1572 Otherwise, a dash is printed.
1573 Notice how each question mark has a matching period,
1574 and how the % after the %pt
1575 is included literally by escaping it with a backslash.
1576 .sp
1577 ?n?f%f\ .?m(%T %i of %m)\ ..?e(END)\ ?x-\ Next\e:\ %x..%t";
1578 .sp
1579 This prints the filename if this is the first prompt in a file,
1580 followed by the "file N of N" message if there is more
1581 than one input file.
1582 Then, if we are at end-of-file, the string "(END)" is printed
1583 followed by the name of the next file, if there is one.
1584 Finally, any trailing spaces are truncated.
1585 This is the default prompt.
1586 For reference, here are the defaults for
1587 the other two prompts (\-m and \-M respectively).
1588 Each is broken into two lines here for readability only.
1589 .nf
1590 .sp
1591 ?n?f%f\ .?m(%T\ %i\ of\ %m)\ ..?e(END)\ ?x-\ Next\e:\ %x.:
1592         ?pB%pB\e%:byte\ %bB?s/%s...%t
1593 .sp
1594 ?f%f\ .?n?m(%T\ %i\ of\ %m)\ ..?ltlines\ %lt-%lb?L/%L.\ :
1595         byte\ %bB?s/%s.\ .?e(END)\ ?x-\ Next\e:\ %x.:?pB%pB\e%..%t
1596 .sp
1597 .fi
1598 And here is the default message produced by the = command:
1599 .nf
1600 .sp
1601 ?f%f\ .?m(%T\ %i\ of\ %m)\ .?ltlines\ %lt-%lb?L/%L.\ .
1602         byte\ %bB?s/%s.\ ?e(END)\ :?pB%pB\e%..%t
1603 .fi
1604 .PP
1605 The prompt expansion features are also used for another purpose:
1606 if an environment variable LESSEDIT is defined, it is used
1607 as the command to be executed when the v command is invoked.
1608 The LESSEDIT string is expanded in the same way as the prompt strings.
1609 The default value for LESSEDIT is:
1610 .nf
1611 .sp
1612         %E\ ?lm+%lm.\ %g
1613 .sp
1614 .fi
1615 Note that this expands to the editor name, followed by a + and the
1616 line number, followed by the shell-escaped file name.
1617 If your editor does not accept the "+linenumber" syntax, or has other
1618 differences in invocation syntax, the LESSEDIT variable can be
1619 changed to modify this default.
1620 .
1621 .SH SECURITY
1622 When the environment variable LESSSECURE is set to 1,
1623 .I less
1624 runs in a "secure" mode.
1625 This means these features are disabled:
1626 .RS
1627 .IP "!"
1628 the shell command
1629 .IP "|"
1630 the pipe command
1631 .IP ":e"
1632 the examine command.
1633 .IP "v"
1634 the editing command
1635 .IP "s  \-o"
1636 log files
1637 .IP "\-k"
1638 use of lesskey files
1639 .IP "\-t"
1640 use of tags files
1641 .IP
1642 metacharacters in filenames, such as *
1643 .IP
1644 filename completion (TAB, ^L)
1645 .RE
1646 .PP
1647 Less can also be compiled to be permanently in "secure" mode.
1648 .
1649 .SH "COMPATIBILITY WITH MORE"
1650 If the environment variable LESS_IS_MORE is set to 1,
1651 or if the program is invoked via a file link named "more",
1652 .I less
1653 behaves (mostly) in conformance with the POSIX "more" command specification.
1654 In this mode, less behaves differently in these ways:
1655 .PP
1656 The \-e option works differently.
1657 If the \-e option is not set,
1658 .I less
1659 behaves as if the \-e option were set.
1660 If the \-e option is set,
1661 .I less
1662 behaves as if the \-E option were set.
1663 .PP
1664 The \-m option works differently.
1665 If the \-m option is not set, the medium prompt is used,
1666 and it is prefixed with the string "\-\-More\-\-".
1667 If the \-m option is set, the short prompt is used.
1668 .PP
1669 The \-n option acts like the \-z option.
1670 The normal behavior of the \-n option is unavailable in this mode.
1671 .PP
1672 The parameter to the \-p option is taken to be a
1673 .I less
1674 command rather than a search pattern.
1675 .PP
1676 The LESS environment variable is ignored,
1677 and the MORE environment variable is used in its place.
1678 .
1679 .SH "ENVIRONMENT VARIABLES"
1680 Environment variables may be specified either in the system environment
1681 as usual, or in a
1682 .IR lesskey (1)
1683 file.
1684 If environment variables are defined in more than one place,
1685 variables defined in a local lesskey file take precedence over
1686 variables defined in the system environment, which take precedence
1687 over variables defined in the system-wide lesskey file.
1688 .IP COLUMNS
1689 Sets the number of columns on the screen.
1690 Takes precedence over the number of columns specified by the TERM variable.
1691 (But if you have a windowing system which supports TIOCGWINSZ or WIOCGETD,
1692 the window system's idea of the screen size takes precedence over the
1693 LINES and COLUMNS environment variables.)
1694 .IP EDITOR
1695 The name of the editor (used for the v command).
1696 .IP HOME
1697 Name of the user's home directory
1698 (used to find a lesskey file on Unix and OS/2 systems).
1699 .IP "HOMEDRIVE, HOMEPATH"
1700 Concatenation of the HOMEDRIVE and HOMEPATH environment variables is
1701 the name of the user's home directory if the HOME variable is not set
1702 (only in the Windows version).
1703 .IP INIT
1704 Name of the user's init directory (used to find a lesskey file on OS/2 systems).
1705 .IP LANG
1706 Language for determining the character set.
1707 .IP LC_CTYPE
1708 Language for determining the character set.
1709 .IP LESS
1710 Options which are passed to
1711 .I less
1712 automatically.
1713 .IP LESSANSIENDCHARS
1714 Characters which may end an ANSI color escape sequence
1715 (default "m").
1716 .IP LESSANSIMIDCHARS
1717 Characters which may appear between the ESC character and the
1718 end character in an ANSI color escape sequence
1719 (default "0123456789:;[?!"'#%()*+\ ".
1720 .IP LESSBINFMT
1721 Format for displaying non-printable, non-control characters.
1722 .IP LESSCHARDEF
1723 Defines a character set.
1724 .IP LESSCHARSET
1725 Selects a predefined character set.
1726 .IP LESSCLOSE
1727 Command line to invoke the (optional) input-postprocessor.
1728 .IP LESSECHO
1729 Name of the lessecho program (default "lessecho").
1730 The lessecho program is needed to expand metacharacters, such as * and ?,
1731 in filenames on Unix systems.
1732 .IP LESSEDIT
1733 Editor prototype string (used for the v command).
1734 See discussion under PROMPTS.
1735 .IP LESSGLOBALTAGS
1736 Name of the command used by the \-t option to find global tags.
1737 Normally should be set to "global" if your system has the
1738 .IR global (1)
1739 command.  If not set, global tags are not used.
1740 .IP LESSHISTFILE
1741 Name of the history file used to remember search commands and
1742 shell commands between invocations of
1743 .IR less .
1744 If set to "\-" or "/dev/null", a history file is not used.
1745 The default is "$HOME/.lesshst" on Unix systems, "$HOME/_lesshst" on
1746 DOS and Windows systems, or "$HOME/lesshst.ini" or "$INIT/lesshst.ini"
1747 on OS/2 systems.
1748 .IP LESSHISTSIZE
1749 The maximum number of commands to save in the history file.
1750 The default is 100.
1751 .IP LESSKEY
1752 Name of the default
1753 .IR lesskey (1)
1754 file.
1755 .IP LESSKEY_SYSTEM
1756 Name of the default system-wide
1757 .IR lesskey (1)
1758 file.
1759 .IP LESSMETACHARS
1760 List of characters which are considered "metacharacters" by the shell.
1761 .IP LESSMETAESCAPE
1762 Prefix which less will add before each metacharacter in a
1763 command sent to the shell.
1764 If LESSMETAESCAPE is an empty string, commands containing
1765 metacharacters will not be passed to the shell.
1766 .IP LESSOPEN
1767 Command line to invoke the (optional) input-preprocessor.
1768 .IP LESSSECURE
1769 Runs less in "secure" mode.
1770 See discussion under SECURITY.
1771 .IP LESSSEPARATOR
1772 String to be appended to a directory name in filename completion.
1773 .IP LESSUTFBINFMT
1774 Format for displaying non-printable Unicode code points.
1775 .IP LESS_IS_MORE
1776 Emulate the
1777 .IR more (1)
1778 command.
1779 .IP LINES
1780 Sets the number of lines on the screen.
1781 Takes precedence over the number of lines specified by the TERM variable.
1782 (But if you have a windowing system which supports TIOCGWINSZ or WIOCGETD,
1783 the window system's idea of the screen size takes precedence over the
1784 LINES and COLUMNS environment variables.)
1785 .IP MORE
1786 Options which are passed to
1787 .I less
1788 automatically when running in
1789 .I more
1790 compatible mode.
1791 .IP PATH
1792 User's search path (used to find a lesskey file
1793 on MS-DOS and OS/2 systems).
1794 .IP SHELL
1795 The shell used to execute the !\& command, as well as to expand filenames.
1796 .IP TERM
1797 The type of terminal on which
1798 .I less
1799 is being run.
1800 .IP VISUAL
1801 The name of the editor (used for the v command).
1802 .
1803 .SH "SEE ALSO"
1804 .BR lesskey (1)
1805 .
1806 .SH COPYRIGHT
1807 Copyright (C) 1984-2020  Mark Nudelman
1808 .PP
1809 less is part of the GNU project and is free software.
1810 You can redistribute it and/or modify it
1811 under the terms of either
1812 (1) the GNU General Public License as published by
1813 the Free Software Foundation; or (2) the Less License.
1814 See the file README in the less distribution for more details
1815 regarding redistribution.
1816 You should have received a copy of the GNU General Public License
1817 along with the source for less; see the file COPYING.
1818 If not, write to the Free Software Foundation, 59 Temple Place,
1819 Suite 330, Boston, MA  02111-1307, USA.
1820 You should also have received a copy of the Less License;
1821 see the file LICENSE.
1822 .PP
1823 less is distributed in the hope that it will be useful, but
1824 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
1825 or FITNESS FOR A PARTICULAR PURPOSE.
1826 See the GNU General Public License for more details.
1827 .
1828 .SH AUTHOR
1829 .
1830 Mark Nudelman
1831 .br
1832 Report bugs at https://github.com/gwsw/less/issues.
1833 .br
1834 For more information, see the less homepage at
1835 .br
1836 http://www.greenwoodsoftware.com/less.