logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

less.1 (88814B)


  1. '\" t
  2. .TH LESS 1 "Version 643: 20 Jul 2023"
  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\(ti]"
  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. .B Less
  28. is a program similar to
  29. .BR more (1),
  30. but which allows backward movement
  31. in the file as well as forward movement.
  32. Also,
  33. .B 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. .BR vi (1).
  37. .B 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. .B more
  46. and
  47. .BR 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, \(haX 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 \(haV or f or \(haF"
  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 \(haV 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 \(haN or e or \(haE or j or \(haJ"
  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 \(haD"
  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 \(haB 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 \(haY or \(haP or k or \(haK"
  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 \(haY as a special job control character.
  84. .IP "u or \(haU"
  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 \(haRIGHTARROW"
  105. Scroll horizontally right to show the end of the longest displayed line.
  106. .IP "ESC-{ or \(haLEFTARROW"
  107. Scroll horizontally left back to the first column.
  108. .IP "r or \(haR or \(haL"
  109. Repaint the screen.
  110. .IP R
  111. Repaint the screen, discarding any buffered input.
  112. That is, reload the current file.
  113. Useful if the file is changing while it is being viewed.
  114. .IP "F"
  115. Scroll forward, and keep trying to read when the
  116. end of file is reached.
  117. Normally this command would be used when already at the end of the file.
  118. It is a way to monitor the tail of a file which is growing
  119. while it is being viewed.
  120. (The behavior is similar to the "tail \-f" command.)
  121. To stop waiting for more data, enter the interrupt character (usually \(haC).
  122. On systems which support
  123. .BR poll (2)
  124. you can also use \(haX or the character specified by the \-\-intr option.
  125. If the input is a pipe and the \-\-exit-follow-on-close option is in effect,
  126. .B less
  127. will automatically stop waiting for data when the input side
  128. of the pipe is closed.
  129. .IP "ESC-F"
  130. Like F, but as soon as a line is found which matches
  131. the last search pattern, the terminal bell is rung
  132. and forward scrolling stops.
  133. .IP "g or < or ESC-<"
  134. Go to line N in the file, default 1 (beginning of file).
  135. (Warning: this may be slow if N is large.)
  136. .IP "G or > or ESC->"
  137. Go to line N in the file, default the end of the file.
  138. (Warning: this may be slow if N is large,
  139. or if N is not specified and
  140. standard input, rather than a file, is being read.)
  141. .IP "ESC-G"
  142. Same as G, except if no number N is specified and the input is standard input,
  143. goes to the last line which is currently buffered.
  144. .IP "p or %"
  145. Go to a position N percent into the file.
  146. N should be between 0 and 100, and may contain a decimal point.
  147. .IP "P"
  148. Go to the line containing byte offset N in the file.
  149. .IP "{"
  150. If a left curly bracket appears in the top line displayed
  151. on the screen,
  152. the { command will go to the matching right curly bracket.
  153. The matching right curly bracket is positioned on the bottom
  154. line of the screen.
  155. If there is more than one left curly bracket on the top line,
  156. a number N may be used to specify the N-th bracket on the line.
  157. .IP "}"
  158. If a right curly bracket appears in the bottom line displayed
  159. on the screen,
  160. the } command will go to the matching left curly bracket.
  161. The matching left curly bracket is positioned on the top
  162. line of the screen.
  163. If there is more than one right curly bracket on the bottom line,
  164. a number N may be used to specify the N-th bracket on the line.
  165. .IP "("
  166. Like {, but applies to parentheses rather than curly brackets.
  167. .IP ")"
  168. Like }, but applies to parentheses rather than curly brackets.
  169. .IP "["
  170. Like {, but applies to square brackets rather than curly brackets.
  171. .IP "]"
  172. Like }, but applies to square brackets rather than curly brackets.
  173. .IP "ESC-\(haF"
  174. Followed by two characters,
  175. acts like {, but uses the two characters as open and close brackets,
  176. respectively.
  177. For example, "ESC \(haF < >" could be used to
  178. go forward to the > which matches the < in the top displayed line.
  179. .IP "ESC-\(haB"
  180. Followed by two characters,
  181. acts like }, but uses the two characters as open and close brackets,
  182. respectively.
  183. For example, "ESC \(haB < >" could be used to
  184. go backward to the < which matches the > in the bottom displayed line.
  185. .IP m
  186. Followed by any lowercase or uppercase letter,
  187. marks the first displayed line with that letter.
  188. If the status column is enabled via the \-J option,
  189. the status column shows the marked line.
  190. .IP M
  191. Acts like m, except the last displayed line is marked
  192. rather than the first displayed line.
  193. .IP "\(aq"
  194. (Single quote.)
  195. Followed by any lowercase or uppercase letter, returns to the position which
  196. was previously marked with that letter.
  197. Followed by another single quote, returns to the position at
  198. which the last "large" movement command was executed.
  199. Followed by a \(ha or $, jumps to the beginning or end of the
  200. file respectively.
  201. Marks are preserved when a new file is examined,
  202. so the \(aq command can be used to switch between input files.
  203. .IP "\(haX\(haX"
  204. Same as single quote.
  205. .IP "ESC-m"
  206. Followed by any lowercase or uppercase letter,
  207. clears the mark identified by that letter.
  208. .IP /pattern
  209. Search forward in the file for the N-th line containing the pattern.
  210. N defaults to 1.
  211. The pattern is a regular expression, as recognized by
  212. the regular expression library supplied by your system.
  213. By default, searching is case-sensitive (uppercase and lowercase
  214. are considered different); the \-i option can be used to change this.
  215. The search starts at the first line displayed
  216. (but see the \-a and \-j options, which change this).
  217. .sp
  218. Certain characters are special
  219. if entered at the beginning of the pattern;
  220. they modify the type of search rather than become part of the pattern:
  221. .RS
  222. .IP "\(haN or !"
  223. Search for lines which do NOT match the pattern.
  224. .IP "\(haE or *"
  225. Search multiple files.
  226. That is, if the search reaches the END of the current file
  227. without finding a match,
  228. the search continues in the next file in the command line list.
  229. .IP "\(haF or @"
  230. Begin the search at the first line of the FIRST file
  231. in the command line list,
  232. regardless of what is currently displayed on the screen
  233. or the settings of the \-a or \-j options.
  234. .IP "\(haK"
  235. Highlight any text which matches the pattern on the current screen,
  236. but don't move to the first match (KEEP current position).
  237. .IP "\(haR"
  238. Don't interpret regular expression metacharacters;
  239. that is, do a simple textual comparison.
  240. .IP "\(haS"
  241. Followed by a digit N between 1 and 5.
  242. Only text which has a non-empty match for the N-th parenthesized SUB-PATTERN
  243. will be considered to match the pattern.
  244. (Supported only if
  245. .B less
  246. is built with one of the regular expression libraries
  247. .BR posix ", " pcre ", or " pcre2 ".)"
  248. Multiple \(haS modifiers can be specified,
  249. to match more than one sub-pattern.
  250. .IP "\(haW"
  251. WRAP around the current file.
  252. That is, if the search reaches the end of the current file
  253. without finding a match, the search continues from the first line of the
  254. current file up to the line where it started.
  255. If the \(haW modifier is set, the \(haE modifier is ignored.
  256. .RE
  257. .IP ?pattern
  258. Search backward in the file for the N-th line containing the pattern.
  259. The search starts at the last line displayed
  260. (but see the \-a and \-j options, which change this).
  261. .sp
  262. Certain characters are special as in the / command:
  263. .RS
  264. .IP "\(haN or !"
  265. Search for lines which do NOT match the pattern.
  266. .IP "\(haE or *"
  267. Search multiple files.
  268. That is, if the search reaches the beginning of the current file
  269. without finding a match,
  270. the search continues in the previous file in the command line list.
  271. .IP "\(haF or @"
  272. Begin the search at the last line of the last file
  273. in the command line list,
  274. regardless of what is currently displayed on the screen
  275. or the settings of the \-a or \-j options.
  276. .IP "\(haK"
  277. As in forward searches.
  278. .IP "\(haR"
  279. As in forward searches.
  280. .IP "\(haS"
  281. As in forward searches.
  282. .IP "\(haW"
  283. WRAP around the current file.
  284. That is, if the search reaches the beginning of the current file
  285. without finding a match, the search continues from the last line of the
  286. current file up to the line where it started.
  287. .RE
  288. .IP "ESC-/pattern"
  289. Same as "/*".
  290. .IP "ESC-?pattern"
  291. Same as "?*".
  292. .IP n
  293. Repeat previous search, for N-th line containing the last pattern.
  294. If the previous search was modified by \(haN, the search is made for the
  295. N-th line NOT containing the pattern.
  296. If the previous search was modified by \(haE, the search continues
  297. in the next (or previous) file if not satisfied in the current file.
  298. If the previous search was modified by \(haR, the search is done
  299. without using regular expressions.
  300. There is no effect if the previous search was modified by \(haF or \(haK.
  301. .IP N
  302. Repeat previous search, but in the reverse direction.
  303. .IP "ESC-n"
  304. Repeat previous search, but crossing file boundaries.
  305. The effect is as if the previous search were modified by *.
  306. .IP "ESC-N"
  307. Repeat previous search, but in the reverse direction
  308. and crossing file boundaries.
  309. .IP "ESC-u"
  310. Undo search highlighting.
  311. Turn off highlighting of strings matching the current search pattern.
  312. If highlighting is already off because of a previous ESC-u command,
  313. turn highlighting back on.
  314. Any search command will also turn highlighting back on.
  315. (Highlighting can also be disabled by toggling the \-G option;
  316. in that case search commands do not turn highlighting back on.)
  317. .IP "ESC-U"
  318. Like ESC-u but also clears the saved search pattern.
  319. If the status column is enabled via the \-J option,
  320. this clears all search matches marked in the status column.
  321. .IP "&pattern"
  322. Display only lines which match the pattern;
  323. lines which do not match the pattern are not displayed.
  324. If pattern is empty (if you type & immediately followed by ENTER),
  325. any filtering is turned off, and all lines are displayed.
  326. While filtering is in effect, an ampersand is displayed at the
  327. beginning of the prompt,
  328. as a reminder that some lines in the file may be hidden.
  329. Multiple & commands may be entered, in which case only lines
  330. which match all of the patterns will be displayed.
  331. .sp
  332. Certain characters are special as in the / command:
  333. .RS
  334. .IP "\(haN or !"
  335. Display only lines which do NOT match the pattern.
  336. .IP "\(haR"
  337. Don't interpret regular expression metacharacters;
  338. that is, do a simple textual comparison.
  339. .RE
  340. .IP ":e [filename]"
  341. Examine a new file.
  342. If the filename is missing, the "current" file (see the :n and :p commands
  343. below) from the list of files in the command line is re-examined.
  344. A percent sign (%) in the filename is replaced by the name of the
  345. current file.
  346. A pound sign (#) is replaced by the name of the previously examined file.
  347. However, two consecutive percent signs are simply
  348. replaced with a single percent sign.
  349. This allows you to enter a filename that contains a percent sign
  350. in the name.
  351. Similarly, two consecutive pound signs are replaced with a single pound sign.
  352. The filename is inserted into the command line list of files
  353. so that it can be seen by subsequent :n and :p commands.
  354. If the filename consists of several files, they are all inserted into
  355. the list of files and the first one is examined.
  356. If the filename contains one or more spaces,
  357. the entire filename should be enclosed in double quotes
  358. (also see the \-" option).
  359. .IP "\(haX\(haV or E"
  360. Same as :e.
  361. Warning: some systems use \(haV as a special literalization character.
  362. On such systems, you may not be able to use \(haV.
  363. .IP ":n"
  364. Examine the next file (from the list of files given in the command line).
  365. If a number N is specified, the N-th next file is examined.
  366. .IP ":p"
  367. Examine the previous file in the command line list.
  368. If a number N is specified, the N-th previous file is examined.
  369. .IP ":x"
  370. Examine the first file in the command line list.
  371. If a number N is specified, the N-th file in the list is examined.
  372. .IP ":d"
  373. Remove the current file from the list of files.
  374. .IP "t"
  375. Go to the next tag, if there were more than one matches for the current tag.
  376. See the \-t option for more details about tags.
  377. .IP "T"
  378. Go to the previous tag, if there were more than one matches for the current tag.
  379. .IP "= or \(haG or :f"
  380. Prints some information about the file being viewed,
  381. including its name
  382. and the line number and byte offset of the bottom line being displayed.
  383. If possible, it also prints the length of the file,
  384. the number of lines in the file
  385. and the percent of the file above the last displayed line.
  386. .IP \-
  387. Followed by one of the command line option letters (see OPTIONS below),
  388. this will change the setting of that option
  389. and print a message describing the new setting.
  390. If a \(haP (CONTROL-P) is entered immediately after the dash,
  391. the setting of the option is changed but no message is printed.
  392. If the option letter has a numeric value (such as \-b or \-h),
  393. or a string value (such as \-P or \-t),
  394. a new value may be entered after the option letter.
  395. If no new value is entered, a message describing
  396. the current setting is printed and nothing is changed.
  397. .IP \-\-
  398. Like the \- command, but takes a long option name (see OPTIONS below)
  399. rather than a single option letter.
  400. You must press ENTER or RETURN after typing the option name.
  401. A \(haP immediately after the second dash suppresses printing of a
  402. message describing the new setting, as in the \- command.
  403. .IP \-+
  404. Followed by one of the command line option letters
  405. this will reset the option to its default setting
  406. and print a message describing the new setting.
  407. (The "\-+\fIX\fP" command does the same thing
  408. as "\-+\fIX\fP" on the command line.)
  409. This does not work for string-valued options.
  410. .IP \-\-+
  411. Like the \-+ command, but takes a long option name
  412. rather than a single option letter.
  413. .IP \-!
  414. Followed by one of the command line option letters,
  415. this will reset the option to the "opposite" of its default setting
  416. and print a message describing the new setting.
  417. This does not work for numeric or string-valued options.
  418. .IP \-\-!
  419. Like the \-!\& command, but takes a long option name
  420. rather than a single option letter.
  421. .IP _
  422. (Underscore.)
  423. Followed by one of the command line option letters,
  424. this will print a message describing the current setting of that option.
  425. The setting of the option is not changed.
  426. .IP __
  427. (Double underscore.)
  428. Like the _ (underscore) command, but takes a long option name
  429. rather than a single option letter.
  430. You must press ENTER or RETURN after typing the option name.
  431. .IP +cmd
  432. Causes the specified cmd to be executed each time a new file is examined.
  433. For example, +G causes
  434. .B less
  435. to initially display each file starting at the end
  436. rather than the beginning.
  437. .IP V
  438. Prints the version number of
  439. .B less
  440. being run.
  441. .IP "q or Q or :q or :Q or ZZ"
  442. Exits
  443. .BR less .
  444. .PP
  445. The following
  446. six
  447. commands may or may not be valid, depending on your particular installation.
  448. .
  449. .IP v
  450. Invokes an editor to edit the current file being viewed.
  451. The editor is taken from the environment variable VISUAL if defined,
  452. or EDITOR if VISUAL is not defined,
  453. or defaults to "vi" if neither VISUAL nor EDITOR is defined.
  454. See also the discussion of LESSEDIT under the section on PROMPTS below.
  455. .IP "! shell-command"
  456. Invokes a shell to run the shell-command given.
  457. A percent sign (%) in the command is replaced by the name of the
  458. current file.
  459. A pound sign (#) is replaced by the name of the previously examined file.
  460. "!!" repeats the last shell command.
  461. "!" with no shell command simply invokes a shell.
  462. On Unix systems, the shell is taken from the environment variable SHELL,
  463. or defaults to "sh".
  464. On MS-DOS and OS/2 systems, the shell is the normal command processor.
  465. .IP "# shell-command"
  466. Similar to the "!" command,
  467. except that the command is expanded in the same way as prompt strings.
  468. For example, the name of the current file would be given as "%f".
  469. .IP "| <m> shell-command"
  470. <m> represents any mark letter.
  471. Pipes a section of the input file to the given shell command.
  472. The section of the file to be piped is between the position marked by
  473. the letter and the current screen.
  474. The entire current screen is included, regardless of whether the
  475. marked position is before or after the current screen.
  476. <m> may also be \(ha or $ to indicate beginning or end of file respectively.
  477. If <m> is \&.\& or newline, the current screen is piped.
  478. .IP "s filename"
  479. Save the input to a file.
  480. This works only if the input is a pipe, not an ordinary file.
  481. .IP "\(haX"
  482. When the "Waiting for data" message is displayed,
  483. such as while in the F command, pressing \(haX
  484. will stop
  485. .B less
  486. from waiting and return to a prompt.
  487. This may cause
  488. .B less
  489. to think that the file ends at the current position,
  490. so it may be necessary to use the R or F command to see more data.
  491. The \-\-intr option can be used to specify a different character
  492. to use instead of \(haX.
  493. This command works only on systems that support the
  494. .BR poll (2)
  495. function.
  496. On systems without
  497. .BR poll (2),
  498. the interrupt character (usually \(haC) can be used instead.
  499. .
  500. .SH OPTIONS
  501. Command line options are described below.
  502. Most options may be changed while
  503. .B less
  504. is running, via the "\-" command.
  505. .PP
  506. Some options may be given in one of two forms:
  507. either a dash followed by a single letter,
  508. or two dashes followed by a long option name.
  509. A long option name may be abbreviated as long as
  510. the abbreviation is unambiguous.
  511. For example, \-\-quit-at-eof may be abbreviated \-\-quit, but not
  512. \-\-qui, since both \-\-quit-at-eof and \-\-quiet begin with \-\-qui.
  513. Some long option names are in uppercase, such as \-\-QUIT-AT-EOF, as
  514. distinct from \-\-quit-at-eof.
  515. Such option names need only have their first letter capitalized;
  516. the remainder of the name may be in either case.
  517. For example, \-\-Quit-at-eof is equivalent to \-\-QUIT-AT-EOF.
  518. .PP
  519. Options are also taken from the environment variable "LESS".
  520. For example,
  521. to avoid typing "less \-options \&...\&" each time
  522. .B less
  523. is invoked, you might tell
  524. .BR csh :
  525. .sp
  526. setenv LESS "\-options"
  527. .sp
  528. or if you use
  529. .BR sh :
  530. .sp
  531. LESS="\-options"; export LESS
  532. .sp
  533. On MS-DOS, you don't need the quotes, but you should replace any
  534. percent signs in the options string by double percent signs.
  535. .sp
  536. The environment variable is parsed before the command line,
  537. so command line options override the LESS environment variable.
  538. If an option appears in the LESS variable, it can be reset
  539. to its default value on the command line by beginning the command
  540. line option with "\-+".
  541. .sp
  542. Some options like \-k or \-D require a string to follow the option letter.
  543. The string for that option is considered to end when a dollar sign ($) is found.
  544. For example, you can set two \-D options like this:
  545. .sp
  546. LESS="Dn9.1$Ds4.1"
  547. .sp
  548. If the \-\-use-backslash option appears earlier in the options, then
  549. a dollar sign or backslash may be included literally in an option string
  550. by preceding it with a backslash.
  551. If the \-\-use-backslash option is not in effect, then backslashes are
  552. not treated specially, and there is no way to include a dollar sign
  553. in the option string.
  554. .IP "\-? or \-\-help"
  555. This option displays a summary of the commands accepted by
  556. .B less
  557. (the same as the h command).
  558. (Depending on how your shell interprets the question mark,
  559. it may be necessary to quote the question mark, thus: "\-\e?".)
  560. .IP "\-a or \-\-search-skip-screen"
  561. By default, forward searches start at the top of the displayed screen
  562. and backwards searches start at the bottom of the displayed screen
  563. (except for repeated searches invoked by the n or N commands,
  564. which start after or before the "target" line respectively;
  565. see the \-j option for more about the target line).
  566. The \-a option causes forward searches to instead start at
  567. the bottom of the screen
  568. and backward searches to start at the top of the screen,
  569. thus skipping all lines displayed on the screen.
  570. .IP "\-A or \-\-SEARCH-SKIP-SCREEN"
  571. Causes all forward searches (not just non-repeated searches)
  572. to start just after the target line, and all backward searches
  573. to start just before the target line.
  574. Thus, forward searches will skip part of the displayed screen
  575. (from the first line up to and including the target line).
  576. Similarly backwards searches will skip the displayed screen
  577. from the last line up to and including the target line.
  578. This was the default behavior in less versions prior to 441.
  579. .IP "\-b\fIn\fP or \-\-buffers=\fIn\fP"
  580. Specifies the amount of buffer space
  581. .B less
  582. will use for each file, in units of kilobytes (1024 bytes).
  583. By default 64\ KB of buffer space is used for each file
  584. (unless the file is a pipe; see the \-B option).
  585. The \-b option specifies instead that \fIn\fP kilobytes of
  586. buffer space should be used for each file.
  587. If \fIn\fP is \-1, buffer space is unlimited; that is,
  588. the entire file can be read into memory.
  589. .IP "\-B or \-\-auto-buffers"
  590. By default, when data is read from a pipe,
  591. buffers are allocated automatically as needed.
  592. If a large amount of data is read from the pipe, this can cause
  593. a large amount of memory to be allocated.
  594. The \-B option disables this automatic allocation of buffers for pipes,
  595. so that only 64\ KB
  596. (or the amount of space specified by the \-b option)
  597. is used for the pipe.
  598. Warning: use of \-B can result in erroneous display, since only the
  599. most recently viewed part of the piped data is kept in memory;
  600. any earlier data is lost.
  601. Lost characters are displayed as question marks.
  602. .IP "\-c or \-\-clear-screen"
  603. Causes full screen repaints to be painted from the top line down.
  604. By default,
  605. full screen repaints are done by scrolling from the bottom of the screen.
  606. .IP "\-C or \-\-CLEAR-SCREEN"
  607. Same as \-c, for compatibility with older versions of
  608. .BR less .
  609. .IP "\-d or \-\-dumb"
  610. The \-d option suppresses the error message
  611. normally displayed if the terminal is dumb;
  612. that is, lacks some important capability,
  613. such as the ability to clear the screen or scroll backward.
  614. The \-d option does not otherwise change the behavior of
  615. .B less
  616. on a dumb terminal.
  617. .IP "\-D\fBx\fP\fIcolor\fP or \-\-color=\fBx\fP\fIcolor\fP"
  618. Changes the color of different parts of the displayed text.
  619. \fBx\fP is a single character which selects the type of text
  620. whose color is being set:
  621. .RS
  622. .IP "B"
  623. Binary characters.
  624. .IP "C"
  625. Control characters.
  626. .IP "E"
  627. Errors and informational messages.
  628. .IP "H"
  629. Header lines and columns, set via the \-\-header option.
  630. .IP "M"
  631. Mark letters in the status column.
  632. .IP "N"
  633. Line numbers enabled via the \-N option.
  634. .IP "P"
  635. Prompts.
  636. .IP "R"
  637. The rscroll character.
  638. .IP "S"
  639. Search results.
  640. .IP "1-5"
  641. The text in a search result which matches
  642. the first through fifth parenthesized sub-pattern.
  643. Sub-pattern coloring works only if
  644. .B less
  645. is built with one of the regular expression libraries
  646. .BR posix ", " pcre ", or " pcre2 .
  647. .IP "W"
  648. The highlight enabled via the \-w option.
  649. .IP "d"
  650. Bold text.
  651. .IP "k"
  652. Blinking text.
  653. .IP "s"
  654. Standout text.
  655. .IP "u"
  656. Underlined text.
  657. .RE
  658. .RS
  659. The uppercase letters and digits can be used only when the \-\-use-color option is enabled.
  660. When text color is specified by both an uppercase letter and a lowercase letter,
  661. the uppercase letter takes precedence.
  662. For example, error messages are normally displayed as standout text.
  663. So if both "s" and "E" are given a color, the "E" color applies
  664. to error messages, and the "s" color applies to other standout text.
  665. The "d" and "u" letters refer to bold and underline text formed by
  666. overstriking with backspaces (see the \-U option),
  667. not to text using ANSI escape sequences with the \-R option.
  668. .PP
  669. A lowercase letter may be followed by a + to indicate that
  670. the normal format change and the specified color should both be used.
  671. For example, \-Dug displays underlined text as green without underlining;
  672. the green color has replaced the usual underline formatting.
  673. But \-Du+g displays underlined text as both green and in underlined format.
  674. .PP
  675. \fIcolor\fP is either a 4-bit color string or an 8-bit color string:
  676. .PP
  677. A 4-bit color string is zero, one or two characters, where
  678. the first character specifies the foreground color and
  679. the second specifies the background color as follows:
  680. .IP "b"
  681. Blue
  682. .IP "c"
  683. Cyan
  684. .IP "g"
  685. Green
  686. .IP "k"
  687. Black
  688. .IP "m"
  689. Magenta
  690. .IP "r"
  691. Red
  692. .IP "w"
  693. White
  694. .IP "y"
  695. Yellow
  696. .PP
  697. The corresponding uppercase letter denotes a brighter shade of the color.
  698. For example, \-DNGk displays line numbers as bright green text on a black
  699. background, and \-DEbR displays error messages as blue text on a
  700. bright red background.
  701. If either character is a "-" or is omitted, the corresponding color
  702. is set to that of normal text.
  703. .PP
  704. An 8-bit color string is one or two decimal integers separated by a dot,
  705. where the first integer specifies the foreground color and
  706. the second specifies the background color.
  707. Each integer is a value between 0 and 255 inclusive which selects
  708. a "CSI 38;5" color value (see
  709. .br
  710. .nh
  711. https://en.wikipedia.org/wiki/ANSI_escape_code#SGR)
  712. .hy
  713. If either integer is a "-" or is omitted,
  714. the corresponding color is set to that of normal text.
  715. On MS-DOS versions of
  716. .BR less ,
  717. 8-bit color is not supported; instead, decimal values are interpreted as 4-bit
  718. CHAR_INFO.Attributes values
  719. (see
  720. .br
  721. .nh
  722. https://docs.microsoft.com/en-us/windows/console/char-info-str).
  723. .hy
  724. .PP
  725. On MS-DOS only, the \-Da option may be used to specify strict parsing of
  726. ANSI color (SGR) sequences when the \-R option is used.
  727. Without this option, sequences that change text attributes
  728. (bold, underline, etc.) may clear the text color.
  729. .RE
  730. .IP "\-e or \-\-quit-at-eof"
  731. Causes
  732. .B less
  733. to automatically exit
  734. the second time it reaches end-of-file.
  735. By default, the only way to exit
  736. .B less
  737. is via the "q" command.
  738. .IP "\-E or \-\-QUIT-AT-EOF"
  739. Causes
  740. .B less
  741. to automatically exit the first time it reaches end-of-file.
  742. .IP "\-f or \-\-force"
  743. Forces non-regular files to be opened.
  744. (A non-regular file is a directory or a device special file.)
  745. Also suppresses the warning message when a binary file is opened.
  746. By default,
  747. .B less
  748. will refuse to open non-regular files.
  749. Note that some operating systems will not allow directories
  750. to be read, even if \-f is set.
  751. .IP "\-F or \-\-quit-if-one-screen"
  752. Causes
  753. .B less
  754. to automatically exit
  755. if the entire file can be displayed on the first screen.
  756. .IP "\-g or \-\-hilite-search"
  757. Normally,
  758. .B less
  759. will highlight ALL strings which match the last search command.
  760. The \-g option changes this behavior to highlight only the particular string
  761. which was found by the last search command.
  762. This can cause
  763. .B less
  764. to run somewhat faster than the default.
  765. .IP "\-G or \-\-HILITE-SEARCH"
  766. The \-G option suppresses all highlighting of strings found by search commands.
  767. .IP "\-h\fIn\fP or \-\-max-back-scroll=\fIn\fP"
  768. Specifies a maximum number of lines to scroll backward.
  769. If it is necessary to scroll backward more than \fIn\fP lines,
  770. the screen is repainted in a forward direction instead.
  771. (If the terminal does not have the ability to scroll
  772. backward, \-h0 is implied.)
  773. .IP "\-i or \-\-ignore-case"
  774. Causes searches to ignore case; that is,
  775. uppercase and lowercase are considered identical.
  776. This option is ignored if any uppercase letters
  777. appear in the search pattern;
  778. in other words,
  779. if a pattern contains uppercase letters, then that search does not ignore case.
  780. .IP "\-I or \-\-IGNORE-CASE"
  781. Like \-i, but searches ignore case even if
  782. the pattern contains uppercase letters.
  783. .IP "\-j\fIn\fP or \-\-jump-target=\fIn\fP"
  784. Specifies a line on the screen where the "target" line
  785. is to be positioned.
  786. The target line is the line specified by any command to
  787. search for a pattern, jump to a line number,
  788. jump to a file percentage or jump to a tag.
  789. The screen line may be specified by a number: the top line on the screen
  790. is 1, the next is 2, and so on.
  791. The number may be negative to specify a line relative to the bottom
  792. of the screen: the bottom line on the screen is \-1, the second
  793. to the bottom is \-2, and so on.
  794. Alternately, the screen line may be specified as a fraction of the height
  795. of the screen, starting with a decimal point: \&.5 is in the middle of the
  796. screen, \&.3 is three tenths down from the first line, and so on.
  797. If the line is specified as a fraction, the actual line number
  798. is recalculated if the terminal window is resized.
  799. If any form of the \-j option is used,
  800. repeated forward searches (invoked with "n" or "N")
  801. begin at the line immediately after the target line,
  802. and repeated backward searches begin at the target line,
  803. unless changed by \-a or \-A.
  804. For example, if "\-j4" is used, the target line is the
  805. fourth line on the screen, so forward searches begin at the fifth line
  806. on the screen.
  807. However nonrepeated searches (invoked with "/" or "?")
  808. always begin at the start or end of the current screen respectively.
  809. .IP "\-J or \-\-status-column"
  810. Displays a status column at the left edge of the screen.
  811. The character displayed in the status column may be one of:
  812. .RS
  813. .IP ">"
  814. The line is chopped with the \-S option, and
  815. the text that is chopped off beyond the right edge of the screen
  816. contains a match for the current search.
  817. .IP "<"
  818. The line is horizontally shifted, and
  819. the text that is shifted beyond the left side of the screen
  820. contains a match for the current search.
  821. .IP "="
  822. The line is both chopped and shifted,
  823. and there are matches beyond both sides of the screen.
  824. .IP "*"
  825. There are matches in the visible part of the line
  826. but none to the right or left of it.
  827. .IP "a-z, A-Z"
  828. The line has been marked with the corresponding letter via the m command.
  829. .RE
  830. .IP "\-k\fIfilename\fP or \-\-lesskey-file=\fIfilename\fP"
  831. Causes
  832. .B less
  833. to open and interpret the named file as a
  834. .BR lesskey (1)
  835. binary file.
  836. Multiple \-k options may be specified.
  837. If the LESSKEY or LESSKEY_SYSTEM environment variable is set, or
  838. if a lesskey file is found in a standard place (see KEY BINDINGS),
  839. it is also used as a
  840. .B lesskey
  841. file.
  842. .IP "\-\-lesskey-src=\fIfilename\fP"
  843. Causes
  844. .B less
  845. to open and interpret the named file as a
  846. .BR lesskey (1)
  847. source file.
  848. If the LESSKEYIN or LESSKEYIN_SYSTEM environment variable is set, or
  849. if a lesskey source file is found in a standard place (see KEY BINDINGS),
  850. it is also used as a
  851. .I "lesskey source"
  852. file.
  853. Prior to version 582, the
  854. .B lesskey
  855. program needed to be run to convert a
  856. .I "lesskey source"
  857. file to a
  858. .I "lesskey binary"
  859. file for
  860. .B less
  861. to use.
  862. Newer versions of
  863. .B less
  864. read the
  865. .I "lesskey source"
  866. file directly and ignore the binary file if the source file exists.
  867. .IP "\-K or \-\-quit-on-intr"
  868. Causes
  869. .B less
  870. to exit immediately (with status 2)
  871. when an interrupt character (usually \(haC) is typed.
  872. Normally, an interrupt character causes
  873. .B less
  874. to stop whatever it is doing and return to its command prompt.
  875. Note that use of this option makes it impossible to return to the
  876. command prompt from the "F" command.
  877. .IP "\-L or \-\-no-lessopen"
  878. Ignore the LESSOPEN environment variable
  879. (see the INPUT PREPROCESSOR section below).
  880. This option can be set from within
  881. .BR less ,
  882. but it will apply only to files opened subsequently, not to the
  883. file which is currently open.
  884. .IP "\-m or \-\-long-prompt"
  885. Causes
  886. .B less
  887. to prompt verbosely (like
  888. .BR more (1)),
  889. with the percent into the file.
  890. By default,
  891. .B less
  892. prompts with a colon.
  893. .IP "\-M or \-\-LONG-PROMPT"
  894. Causes
  895. .B less
  896. to prompt even more verbosely than
  897. .BR more (1).
  898. .IP "\-n or \-\-line-numbers"
  899. Suppresses line numbers.
  900. The default (to use line numbers) may cause
  901. .B less
  902. to run more slowly in some cases, especially with a very large input file.
  903. Suppressing line numbers with the \-n option will avoid this problem.
  904. Using line numbers means: the line number will be displayed in the verbose
  905. prompt and in the = command,
  906. and the v command will pass the current line number to the editor
  907. (see also the discussion of LESSEDIT in PROMPTS below).
  908. .IP "\-N or \-\-LINE-NUMBERS"
  909. Causes a line number to be displayed at the beginning of
  910. each line in the display.
  911. .IP "\-o\fIfilename\fP or \-\-log-file=\fIfilename\fP"
  912. Causes
  913. .B less
  914. to copy its input to the named file as it is being viewed.
  915. This applies only when the input file is a pipe,
  916. not an ordinary file.
  917. If the file already exists,
  918. .B less
  919. will ask for confirmation before overwriting it.
  920. .IP "\-O\fIfilename\fP or \-\-LOG-FILE=\fIfilename\fP"
  921. The \-O option is like \-o, but it will overwrite an existing
  922. file without asking for confirmation.
  923. .sp
  924. If no log file has been specified,
  925. the \-o and \-O options can be used from within
  926. .B less
  927. to specify a log file.
  928. Without a file name, they will simply report the name of the log file.
  929. The "s" command is equivalent to specifying \-o from within
  930. .BR less .
  931. .IP "\-p\fIpattern\fP or \-\-pattern=\fIpattern\fP"
  932. The \-p option on the command line is equivalent to
  933. specifying +/\fIpattern\fP;
  934. that is, it tells
  935. .B less
  936. to start at the first occurrence of \fIpattern\fP in the file.
  937. .IP "\-P\fIprompt\fP or \-\-prompt=\fIprompt\fP"
  938. Provides a way to tailor the three prompt
  939. styles to your own preference.
  940. This option would normally be put in the LESS environment
  941. variable, rather than being typed in with each
  942. .B less
  943. command.
  944. Such an option must either be the last option in the LESS variable,
  945. or be terminated by a dollar sign.
  946. \-Ps followed by a string changes the default (short) prompt
  947. to that string.
  948. \-Pm changes the medium (\-m) prompt.
  949. \-PM changes the long (\-M) prompt.
  950. \-Ph changes the prompt for the help screen.
  951. \-P= changes the message printed by the = command.
  952. \-Pw changes the message printed while waiting for data (in the "F" command).
  953. .sp 1
  954. All prompt strings consist of a sequence of
  955. letters and special escape sequences.
  956. See the section on PROMPTS for more details.
  957. .IP "\-q or \-\-quiet or \-\-silent"
  958. Causes moderately "quiet" operation:
  959. the terminal bell is not rung
  960. if an attempt is made to scroll past the end of the file
  961. or before the beginning of the file.
  962. If the terminal has a "visual bell", it is used instead.
  963. The bell will be rung on certain other errors,
  964. such as typing an invalid character.
  965. The default is to ring the terminal bell in all such cases.
  966. .IP "\-Q or \-\-QUIET or \-\-SILENT"
  967. Causes totally "quiet" operation:
  968. the terminal bell is never rung.
  969. If the terminal has a "visual bell", it is used in all cases
  970. where the terminal bell would have been rung.
  971. .IP "\-r or \-\-raw-control-chars"
  972. Causes "raw" control characters to be displayed.
  973. The default is to display control characters using the caret notation;
  974. for example, a control-A (octal 001) is displayed as "\(haA"
  975. (with some exceptions as described under the \-U option).
  976. Warning: when the \-r option is used,
  977. .B less
  978. cannot keep track of the actual appearance of the screen
  979. (since this depends on how the screen responds to
  980. each type of control character).
  981. Thus, various display problems may result,
  982. such as long lines being split in the wrong place.
  983. .sp
  984. USE OF THE \-r OPTION IS NOT RECOMMENDED.
  985. .IP "\-R or \-\-RAW-CONTROL-CHARS"
  986. Like \-r, but only ANSI "color" escape sequences and OSC 8 hyperlink
  987. sequences are output in "raw" form.
  988. Unlike \-r, the screen appearance is maintained correctly,
  989. provided that there are no escape sequences in the file
  990. other than these types of escape sequences.
  991. Color escape sequences are only supported when the color
  992. is changed within one line, not across lines.
  993. In other words, the beginning of each line is assumed to be
  994. normal (non-colored), regardless of any escape sequences in previous lines.
  995. For the purpose of keeping track of screen appearance,
  996. these escape sequences are assumed to not move the cursor.
  997. .sp
  998. OSC 8 hyperlinks are sequences of the form:
  999. .sp
  1000. ESC ] 8 ; \&...\& \\7
  1001. .sp
  1002. The terminating sequence may be either a BEL character (\\7)
  1003. or the two-character sequence "ESC \\".
  1004. .sp
  1005. ANSI color escape sequences are sequences of the form:
  1006. .sp
  1007. ESC [ \&...\& m
  1008. .sp
  1009. where the "...\&" is zero or more color specification characters.
  1010. You can make
  1011. .B less
  1012. think that characters other than "m" can end ANSI color escape sequences
  1013. by setting the environment variable LESSANSIENDCHARS to the list of
  1014. characters which can end a color escape sequence.
  1015. And you can make
  1016. .B less
  1017. think that characters other than the standard ones may appear between
  1018. the ESC and the m by setting the environment variable LESSANSIMIDCHARS
  1019. to the list of characters which can appear.
  1020. .IP "\-s or \-\-squeeze-blank-lines"
  1021. Causes consecutive blank lines to be squeezed into a single blank line.
  1022. This is useful when viewing
  1023. .B nroff
  1024. output.
  1025. .IP "\-S or \-\-chop-long-lines"
  1026. Causes lines longer than the screen width to be
  1027. chopped (truncated) rather than wrapped.
  1028. That is, the portion of a long line that does not fit in
  1029. the screen width is not displayed until you press RIGHT-ARROW.
  1030. The default is to wrap long lines; that is, display the remainder
  1031. on the next line.
  1032. See also the \-\-wordwrap option.
  1033. .IP "\-t\fItag\fP or \-\-tag=\fItag\fP"
  1034. The \-t option, followed immediately by a TAG,
  1035. will edit the file containing that tag.
  1036. For this to work, tag information must be available;
  1037. for example, there may be a file in the current directory called "tags",
  1038. which was previously built by
  1039. .BR ctags (1)
  1040. or an equivalent command.
  1041. If the environment variable LESSGLOBALTAGS is set, it is taken to be
  1042. the name of a command compatible with
  1043. .BR global (1),
  1044. and that command is executed to find the tag.
  1045. (See
  1046. .nh
  1047. http://www.gnu.org/software/global/global.html).
  1048. .hy
  1049. The \-t option may also be specified from within
  1050. .B less
  1051. (using the \- command) as a way of examining a new file.
  1052. The command ":t" is equivalent to specifying \-t from within
  1053. .BR less .
  1054. .IP "\-T\fItagsfile\fP or \-\-tag-file=\fItagsfile\fP"
  1055. Specifies a tags file to be used instead of "tags".
  1056. .IP "\-u or \-\-underline-special"
  1057. Causes backspaces and carriage returns to be treated as printable characters;
  1058. that is, they are sent to the terminal when they appear in the input.
  1059. .IP "\-U or \-\-UNDERLINE-SPECIAL"
  1060. Causes backspaces, tabs, carriage returns and "formatting characters"
  1061. (as defined by Unicode) to be treated as control characters;
  1062. that is, they are handled as specified by the \-r option.
  1063. .sp
  1064. By default, if neither \-u nor \-U is given,
  1065. backspaces which appear adjacent to an underscore character
  1066. are treated specially:
  1067. the underlined text is displayed
  1068. using the terminal's hardware underlining capability.
  1069. Also, backspaces which appear between two identical characters
  1070. are treated specially:
  1071. the overstruck text is printed
  1072. using the terminal's hardware boldface capability.
  1073. Other backspaces are deleted, along with the preceding character.
  1074. Carriage returns immediately followed by a newline are deleted.
  1075. Other carriage returns are handled as specified by the \-r option.
  1076. Unicode formatting characters, such as the Byte Order Mark,
  1077. are sent to the terminal.
  1078. Text which is overstruck or underlined can be searched for
  1079. if neither \-u nor \-U is in effect.
  1080. .sp
  1081. See also the \-\-proc-backspace, \-\-proc-tab,
  1082. and \-\-proc-return options.
  1083. .IP "\-V or \-\-version"
  1084. Displays the version number of
  1085. .BR less .
  1086. .IP "\-w or \-\-hilite-unread"
  1087. Temporarily highlights the first "new" line after a forward movement
  1088. of a full page.
  1089. The first "new" line is the line immediately following the line previously
  1090. at the bottom of the screen.
  1091. Also highlights the target line after a g or p command.
  1092. The highlight is removed at the next command which causes movement.
  1093. If the \-\-status-line option is in effect, the entire line
  1094. (the width of the screen) is highlighted.
  1095. Otherwise, only the text in the line is highlighted,
  1096. unless the \-J option is in effect,
  1097. in which case only the status column is highlighted.
  1098. .IP "\-W or \-\-HILITE-UNREAD"
  1099. Like \-w, but temporarily highlights the first new line after any
  1100. forward movement command larger than one line.
  1101. .IP "\-x\fIn\fP,...\& or \-\-tabs=\fIn\fP,..."
  1102. Sets tab stops.
  1103. If only one \fIn\fP is specified, tab stops are set at multiples of \fIn\fP.
  1104. If multiple values separated by commas are specified, tab stops
  1105. are set at those positions, and then continue with the same spacing as the
  1106. last two.
  1107. For example, "-x9,17" will set tabs at positions 9, 17, 25, 33, etc.
  1108. The default for \fIn\fP is 8.
  1109. .IP "\-X or \-\-no-init"
  1110. Disables sending the termcap initialization and deinitialization strings
  1111. to the terminal.
  1112. This is sometimes desirable if the deinitialization string does
  1113. something unnecessary, like clearing the screen.
  1114. .IP "\-y\fIn\fP or \-\-max-forw-scroll=\fIn\fP"
  1115. Specifies a maximum number of lines to scroll forward.
  1116. If it is necessary to scroll forward more than \fIn\fP lines,
  1117. the screen is repainted instead.
  1118. The \-c or \-C option may be used to repaint from the top of
  1119. the screen if desired.
  1120. By default, any forward movement causes scrolling.
  1121. .IP "\-z\fIn\fP or \-\-window=\fIn\fP or \-\fIn\fP"
  1122. Changes the default scrolling window size to \fIn\fP lines.
  1123. The default is one screenful.
  1124. The z and w commands can also be used to change the window size.
  1125. The "z" may be omitted for compatibility with some versions of
  1126. .BR more (1).
  1127. If the number
  1128. .I n
  1129. is negative, it indicates
  1130. .I n
  1131. lines less than the current screen size.
  1132. For example, if the screen is 24 lines, \fI\-z\-4\fP sets the
  1133. scrolling window to 20 lines. If the screen is resized to 40 lines,
  1134. the scrolling window automatically changes to 36 lines.
  1135. .IP "\-\(dq\fIcc\fP\ or\ \-\-quotes=\fIcc\fP"
  1136. Changes the filename quoting character.
  1137. This may be necessary if you are trying to name a file
  1138. which contains both spaces and quote characters.
  1139. Followed by a single character, this changes the quote character to that
  1140. character.
  1141. Filenames containing a space should then be surrounded by that character
  1142. rather than by double quotes.
  1143. Followed by two characters, changes the open quote to the first character,
  1144. and the close quote to the second character.
  1145. Filenames containing a space should then be preceded by the open quote
  1146. character and followed by the close quote character.
  1147. Note that even after the quote characters are changed, this option
  1148. remains \-" (a dash followed by a double quote).
  1149. .IP "\-\(ti or \-\-tilde"
  1150. Normally lines after end of file are displayed as a single tilde (\(ti).
  1151. This option causes lines after end of file to be displayed as blank lines.
  1152. .IP "\-# or \-\-shift"
  1153. Specifies the default number of positions to scroll horizontally
  1154. in the RIGHTARROW and LEFTARROW commands.
  1155. If the number specified is zero, it sets the default number of
  1156. positions to one half of the screen width.
  1157. Alternately, the number may be specified as a fraction of the width
  1158. of the screen, starting with a decimal point: \&.5 is half of the
  1159. screen width, \&.3 is three tenths of the screen width, and so on.
  1160. If the number is specified as a fraction, the actual number of
  1161. scroll positions is recalculated if the terminal window is resized.
  1162. .IP "\-\-exit-follow-on-close"
  1163. When using the "F" command on a pipe,
  1164. .B less
  1165. will automatically stop waiting for more data when the input side of the
  1166. pipe is closed.
  1167. .IP "\-\-file-size"
  1168. If \-\-file-size is specified,
  1169. .B less
  1170. will determine the size of the file
  1171. immediately after opening the file.
  1172. Then the "=" command will display the number of lines in the file.
  1173. Normally this is not done, because it can be slow if the input file
  1174. is non-seekable (such as a pipe) and is large.
  1175. .IP "\-\-follow-name"
  1176. Normally, if the input file is renamed while an F command is executing,
  1177. .B less
  1178. will continue to display the contents of the original file despite
  1179. its name change.
  1180. If \-\-follow-name is specified, during an F command
  1181. .B less
  1182. will periodically attempt to reopen the file by name.
  1183. If the reopen succeeds and the file is a different file from the original
  1184. (which means that a new file has been created
  1185. with the same name as the original (now renamed) file),
  1186. .B less
  1187. will display the contents of that new file.
  1188. .IP "\-\-header=\fIN[,M]\fP"
  1189. Sets the number of header lines and columns displayed on the screen.
  1190. The value may be of the form "N,M" where N and M are integers,
  1191. to set the header lines to N and the header columns to M,
  1192. or it may be a single integer "N" which sets the header lines to N
  1193. and the header columns to zero,
  1194. or it may be ",M" which sets the header columns to M and the
  1195. header lines to zero.
  1196. When N is nonzero, the first N lines at the top
  1197. of the screen are replaced with the first N lines of the file,
  1198. regardless of what part of the file are being viewed.
  1199. When M is nonzero, the characters displayed at the
  1200. beginning of each line are replaced with the first M characters of the line,
  1201. even if the rest of the line is scrolled horizontally.
  1202. If either N or M is zero,
  1203. .B less
  1204. stops displaying header lines or columns, respectively.
  1205. (Note that it may be necessary to change the setting of the \-j option
  1206. to ensure that the target line is not obscured by the header line(s).)
  1207. .IP "\-\-incsearch"
  1208. Subsequent search commands will be "incremental"; that is,
  1209. .B less
  1210. will advance to the next line containing the search pattern
  1211. as each character of the pattern is typed in.
  1212. .IP "\-\-intr=\fIc\fP"
  1213. Use the character \fIc\fP instead of \(haX to interrupt a read
  1214. when the "Waiting for data" message is displayed.
  1215. \fIc\fP must be an ASCII character; that is, one with a value
  1216. between 1 and 127 inclusive.
  1217. A caret followed by a single character can be used
  1218. to specify a control character.
  1219. .IP "\-\-line-num-width=\fIn\fP"
  1220. Sets the minimum width of the line number field when the \-N option is in effect
  1221. to \fIn\fP characters.
  1222. The default is 7.
  1223. .IP "\-\-modelines=\fIn\fP"
  1224. .RS
  1225. Before displaying a file,
  1226. .B less
  1227. will read the first \fIn\fP lines to try to find a vim-compatible
  1228. .IR modeline .
  1229. If \fIn\fP is zero,
  1230. .B less
  1231. does not try to find modelines.
  1232. By using a modeline, the file itself can specify the tab stops
  1233. that should be used when viewing it.
  1234. .PP
  1235. A modeline contains, anywhere in the line,
  1236. a program name ("vi", "vim", "ex", or "less"),
  1237. followed by a colon,
  1238. possibly followed by the word "set",
  1239. and finally followed by zero or more option settings.
  1240. If the word "set" is used,
  1241. option settings are separated by spaces, and end at the first colon.
  1242. If the word "set" is not used,
  1243. option settings may be separated by either spaces or colons.
  1244. The word "set" is required if the program name is "less"
  1245. but optional if any of the other three names are used.
  1246. If any option setting is of the form "tabstop=\fIn\fP" or "ts=\fIn\fP",
  1247. then tab stops are automatically set as if \-\-tabs=\fIn\fP had been given.
  1248. See the \-\-tabs description for acceptable values of \fIn\fP.
  1249. .RE
  1250. .IP "\-\-mouse"
  1251. Enables mouse input:
  1252. scrolling the mouse wheel down moves forward in the file,
  1253. scrolling the mouse wheel up moves backwards in the file,
  1254. and clicking the mouse sets the "#" mark to the line
  1255. where the mouse is clicked.
  1256. The number of lines to scroll when the wheel is moved
  1257. can be set by the \-\-wheel-lines option.
  1258. Mouse input works only on terminals which support X11 mouse reporting,
  1259. and on the Windows version of
  1260. .BR less .
  1261. .IP "\-\-MOUSE"
  1262. Like \-\-mouse, except the direction scrolled
  1263. on mouse wheel movement is reversed.
  1264. .IP "\-\-no-keypad"
  1265. Disables sending the keypad initialization and deinitialization strings
  1266. to the terminal.
  1267. This is sometimes useful if the keypad strings make the numeric
  1268. keypad behave in an undesirable manner.
  1269. .IP "\-\-no-histdups"
  1270. This option changes the behavior so that if a search string or
  1271. file name is typed in, and the same string is already in the history list,
  1272. the existing copy is removed from the history list before the new one is added.
  1273. Thus, a given string will appear only once in the history list.
  1274. Normally, a string may appear multiple times.
  1275. .IP "\-\-no-number-headers"
  1276. Header lines (defined via the \-\-header option) are not assigned line numbers.
  1277. Line number 1 is assigned to the first line after any header lines.
  1278. .IP "\-\-no-search-headers"
  1279. Searches do not include header lines or header columns.
  1280. .IP "\-\-no-vbell"
  1281. Disables the terminal's visual bell.
  1282. .IP "\-\-proc-backspace"
  1283. If set, backspaces are handled as if neither the \-u option
  1284. nor the \-U option were set.
  1285. That is, a backspace adjacent to an underscore causes text to be
  1286. displayed in underline mode, and a backspace between identical
  1287. characters cause text to be displayed in boldface mode.
  1288. This option overrides the \-u and \-U options, so that display of
  1289. backspaces can be controlled separate from tabs and carriage returns.
  1290. If not set, backspace display is controlled by the \-u and \-U options.
  1291. .IP "\-\-PROC-BACKSPACE"
  1292. If set, backspaces are handled as if the \-U option were set;
  1293. that is backspaces are treated as control characters.
  1294. .IP "\-\-proc-return"
  1295. If set, carriage returns are handled as if neither the \-u option
  1296. nor the \-U option were set.
  1297. That is, a carriage return immediately before a newline is deleted.
  1298. This option overrides the \-u and \-U options, so that display of
  1299. carriage returns can be controlled separate from that of backspaces and tabs.
  1300. If not set, carriage return display is controlled by the \-u and \-U options.
  1301. .IP "\-\-PROC-RETURN"
  1302. If set, carriage returns are handled as if the \-U option were set;
  1303. that is carriage returns are treated as control characters.
  1304. .IP "\-\-proc-tab"
  1305. If set, tabs are handled as if the \-U option were not set.
  1306. That is, tabs are expanded to spaces.
  1307. This option overrides the \-U option, so that display of
  1308. tabs can be controlled separate from that of backspaces and carriage returns.
  1309. If not set, tab display is controlled by the \-U options.
  1310. .IP "\-\-PROC-TAB"
  1311. If set, tabs are handled as if the \-U option were set;
  1312. that is tabs are treated as control characters.
  1313. .IP "\-\-redraw-on-quit"
  1314. When quitting, after sending the terminal deinitialization string,
  1315. redraws the entire last screen.
  1316. On terminals whose terminal deinitialization string causes the
  1317. terminal to switch from an alternate screen,
  1318. this makes the last screenful of the current file remain visible after
  1319. .B less
  1320. has quit.
  1321. .IP "\-\-rscroll=\fIc\fP"
  1322. This option changes the character used to mark truncated lines.
  1323. It may begin with a two-character attribute indicator like LESSBINFMT does.
  1324. If there is no attribute indicator, standout is used.
  1325. If set to "\-", truncated lines are not marked.
  1326. .IP "\-\-save-marks"
  1327. Save marks in the history file, so marks are retained
  1328. across different invocations of
  1329. .BR less .
  1330. .IP "\-\-search-options=\fI...\fP"
  1331. Sets default search modifiers.
  1332. The value is a string of one or more of the characters
  1333. E, F, K, N, R or W.
  1334. Setting any of these has the same effect as typing that
  1335. control character at the beginning of every search pattern.
  1336. For example, setting \-\-search-options=W is the same as
  1337. typing \(haW at the beginning of every pattern.
  1338. The value may also contain a digit between 1 and 5,
  1339. which has the same effect as typing \(haS followed by that digit
  1340. at the beginning of every search pattern.
  1341. The value "-" disables all default search modifiers.
  1342. .IP "\-\-show-preproc-errors"
  1343. If a preprocessor produces data,
  1344. then exits with a non-zero exit code,
  1345. .B less
  1346. will display a warning.
  1347. .IP "\-\-status-col-width=\fIn\fP"
  1348. Sets the width of the status column when the \-J option is in effect.
  1349. The default is 2 characters.
  1350. .IP "\-\-status-line"
  1351. If a line is marked, the entire line (rather than just the status column)
  1352. is highlighted.
  1353. Also lines highlighted due to the \-w option will have
  1354. the entire line highlighted.
  1355. If \-\-use-color is set, the line is colored rather than highlighted.
  1356. .IP "\-\-use-backslash"
  1357. This option changes the interpretations of options which follow this one.
  1358. After the \-\-use-backslash option, any backslash in an option string is
  1359. removed and the following character is taken literally.
  1360. This allows a dollar sign to be included in option strings.
  1361. .IP "\-\-use-color"
  1362. Enables colored text in various places.
  1363. The \-D option can be used to change the colors.
  1364. Colored text works only if the terminal supports
  1365. ANSI color escape sequences (as defined in ECMA-48 SGR;
  1366. see
  1367. .br
  1368. .nh
  1369. https://www.ecma-international.org/publications-and-standards/standards/ecma-48).
  1370. .hy
  1371. .IP "\-\-wheel-lines=\fIn\fP"
  1372. Set the number of lines to scroll when the mouse wheel is scrolled
  1373. and the \-\-mouse or \-\-MOUSE option is in effect.
  1374. The default is 1 line.
  1375. .IP "\-\-wordwrap"
  1376. When the \-S option is not in use,
  1377. wrap each line at a space or tab if possible,
  1378. so that a word is not split between two lines.
  1379. The default is to wrap at any character.
  1380. .IP \-\-
  1381. A command line argument of "\-\-" marks the end of option arguments.
  1382. Any arguments following this are interpreted as filenames.
  1383. This can be useful when viewing a file whose name begins with a "\-" or "+".
  1384. .IP +
  1385. If a command line option begins with \fB+\fP,
  1386. the remainder of that option is taken to be an initial command to
  1387. .BR less .
  1388. For example, +G tells
  1389. .B less
  1390. to start at the end of the file rather than the beginning,
  1391. and +/xyz tells it to start at the first occurrence of "xyz" in the file.
  1392. As a special case, +<number> acts like +<number>g;
  1393. that is, it starts the display at the specified line number
  1394. (however, see the caveat under the "g" command above).
  1395. If the option starts with ++, the initial command applies to
  1396. every file being viewed, not just the first one.
  1397. The + command described previously
  1398. may also be used to set (or change) an initial command for every file.
  1399. .
  1400. .SH "LINE EDITING"
  1401. When entering a command line at the bottom of the screen
  1402. (for example, a filename for the :e command,
  1403. or the pattern for a search command),
  1404. certain keys can be used to manipulate the command line.
  1405. Most commands have an alternate form in [ brackets ] which can be used if
  1406. a key does not exist on a particular keyboard.
  1407. (Note that the forms beginning with ESC do not work
  1408. in some MS-DOS and Windows systems because ESC is the line erase character.)
  1409. Any of these special keys may be entered literally by preceding
  1410. it with the "literal" character, either \(haV or \(haA.
  1411. A backslash itself may also be entered literally by entering two backslashes.
  1412. .IP "LEFTARROW [ ESC-h ]"
  1413. Move the cursor one space to the left.
  1414. .IP "RIGHTARROW [ ESC-l ]"
  1415. Move the cursor one space to the right.
  1416. .IP "\(haLEFTARROW [ ESC-b or ESC-LEFTARROW ]"
  1417. (That is, CONTROL and LEFTARROW simultaneously.)
  1418. Move the cursor one word to the left.
  1419. .IP "\(haRIGHTARROW [ ESC-w or ESC-RIGHTARROW ]"
  1420. (That is, CONTROL and RIGHTARROW simultaneously.)
  1421. Move the cursor one word to the right.
  1422. .IP "HOME [ ESC-0 ]"
  1423. Move the cursor to the beginning of the line.
  1424. .IP "END [ ESC-$ ]"
  1425. Move the cursor to the end of the line.
  1426. .IP "BACKSPACE"
  1427. Delete the character to the left of the cursor,
  1428. or cancel the command if the command line is empty.
  1429. .IP "DELETE or [ ESC-x ]"
  1430. Delete the character under the cursor.
  1431. .IP "\(haBACKSPACE [ ESC-BACKSPACE ]"
  1432. (That is, CONTROL and BACKSPACE simultaneously.)
  1433. Delete the word to the left of the cursor.
  1434. .IP "\(haDELETE [ ESC-X or ESC-DELETE ]"
  1435. (That is, CONTROL and DELETE simultaneously.)
  1436. Delete the word under the cursor.
  1437. .IP "UPARROW [ ESC-k ]"
  1438. Retrieve the previous command line.
  1439. If you first enter some text and then press UPARROW,
  1440. it will retrieve the previous command which begins with that text.
  1441. .IP "DOWNARROW [ ESC-j ]"
  1442. Retrieve the next command line.
  1443. If you first enter some text and then press DOWNARROW,
  1444. it will retrieve the next command which begins with that text.
  1445. .IP "TAB"
  1446. Complete the partial filename to the left of the cursor.
  1447. If it matches more than one filename, the first match
  1448. is entered into the command line.
  1449. Repeated TABs will cycle thru the other matching filenames.
  1450. If the completed filename is a directory, a "/" is appended to the filename.
  1451. (On MS-DOS systems, a "\e" is appended.)
  1452. The environment variable LESSSEPARATOR can be used to specify a
  1453. different character to append to a directory name.
  1454. .IP "BACKTAB [ ESC-TAB ]"
  1455. Like, TAB, but cycles in the reverse direction thru the matching filenames.
  1456. .IP "\(haL"
  1457. Complete the partial filename to the left of the cursor.
  1458. If it matches more than one filename, all matches are entered into
  1459. the command line (if they fit).
  1460. .IP "\(haU (Unix and OS/2) or ESC (MS-DOS)"
  1461. Delete the entire command line,
  1462. or cancel the command if the command line is empty.
  1463. If you have changed your line-kill character in Unix to something
  1464. other than \(haU, that character is used instead of \(haU.
  1465. .IP "\(haG"
  1466. Delete the entire command line and return to the main prompt.
  1467. .
  1468. .SH "KEY BINDINGS"
  1469. You may define your own
  1470. .B less
  1471. commands by creating a lesskey source file.
  1472. This file specifies a set of command keys and an action
  1473. associated with each key.
  1474. You may also change the line-editing keys (see LINE EDITING),
  1475. and set environment variables used by
  1476. .BR less .
  1477. See the
  1478. .BR lesskey (1)
  1479. manual page for details about the file format.
  1480. .PP
  1481. If the environment variable LESSKEYIN is set,
  1482. .B less
  1483. uses that as the name of the lesskey source file.
  1484. Otherwise,
  1485. .B less
  1486. looks in a standard place for the lesskey source file:
  1487. On Unix systems,
  1488. .B less
  1489. looks for a lesskey file called "$XDG_CONFIG_HOME/lesskey" or "$HOME/.config/lesskey" or "$HOME/.lesskey".
  1490. On MS-DOS and Windows systems,
  1491. .B less
  1492. looks for a lesskey file called "$HOME/_lesskey", and if it is not found there,
  1493. then looks for a lesskey file called "_lesskey" in any directory specified
  1494. in the PATH environment variable.
  1495. On OS/2 systems,
  1496. .B less
  1497. looks for a lesskey file called "$HOME/lesskey.ini", and if it is not found,
  1498. then looks for a lesskey file called "lesskey.ini" in any directory specified
  1499. in the INIT environment variable, and if it not found there,
  1500. then looks for a lesskey file called "lesskey.ini" in any directory specified
  1501. in the PATH environment variable.
  1502. .PP
  1503. A system-wide lesskey source file may also be set up to provide key bindings.
  1504. If a key is defined in both a local lesskey file and in the
  1505. system-wide file, key bindings in the local file take precedence over
  1506. those in the system-wide file.
  1507. If the environment variable LESSKEYIN_SYSTEM is set,
  1508. .B less
  1509. uses that as the name of the system-wide lesskey file.
  1510. Otherwise,
  1511. .B less
  1512. looks in a standard place for the system-wide lesskey file:
  1513. On Unix systems, the system-wide lesskey file is /usr/local/etc/syslesskey.
  1514. (However, if
  1515. .B less
  1516. was built with a different sysconf directory than /usr/local/etc,
  1517. that directory is where the sysless file is found.)
  1518. On MS-DOS and Windows systems, the system-wide lesskey file is c:\e_syslesskey.
  1519. On OS/2 systems, the system-wide lesskey file is c:\esyslesskey.ini.
  1520. .PP
  1521. Previous versions of
  1522. .B less
  1523. (before v582) used lesskey files with a binary format, produced by the
  1524. .B lesskey
  1525. program. It is no longer necessary to use the
  1526. .B lesskey
  1527. program.
  1528. .
  1529. .SH "INPUT PREPROCESSOR"
  1530. You may define an "input preprocessor" for
  1531. .BR less .
  1532. Before
  1533. .B less
  1534. opens a file, it first gives your input preprocessor a chance to modify the
  1535. way the contents of the file are displayed.
  1536. An input preprocessor is simply an executable program (or shell script),
  1537. which writes the contents of the file to a different file,
  1538. called the replacement file.
  1539. The contents of the replacement file are then displayed
  1540. in place of the contents of the original file.
  1541. However, it will appear to the user as if the original file is opened;
  1542. that is,
  1543. .B less
  1544. will display the original filename as the name of the current file.
  1545. .PP
  1546. An input preprocessor receives one command line argument, the original filename,
  1547. as entered by the user.
  1548. It should create the replacement file, and when finished,
  1549. print the name of the replacement file to its standard output.
  1550. If the input preprocessor does not output a replacement filename,
  1551. .B less
  1552. uses the original file, as normal.
  1553. The input preprocessor is not called when viewing standard input.
  1554. To set up an input preprocessor, set the LESSOPEN environment variable
  1555. to a command line which will invoke your input preprocessor.
  1556. This command line should include one occurrence of the string "%s",
  1557. which will be replaced by the filename
  1558. when the input preprocessor command is invoked.
  1559. .PP
  1560. When
  1561. .B less
  1562. closes a file opened in such a way, it will call another program,
  1563. called the input postprocessor,
  1564. which may perform any desired clean-up action (such as deleting the
  1565. replacement file created by LESSOPEN).
  1566. This program receives two command line arguments, the original filename
  1567. as entered by the user, and the name of the replacement file.
  1568. To set up an input postprocessor, set the LESSCLOSE environment variable
  1569. to a command line which will invoke your input postprocessor.
  1570. It may include two occurrences of the string "%s";
  1571. the first is replaced with the original name of the file and
  1572. the second with the name of the replacement file,
  1573. which was output by LESSOPEN.
  1574. .PP
  1575. For example, on many Unix systems, these two scripts will allow you
  1576. to keep files in compressed format, but still let
  1577. .B less
  1578. view them directly:
  1579. .PP
  1580. lessopen.sh:
  1581. .br
  1582. #! /bin/sh
  1583. .br
  1584. case "$1" in
  1585. .br
  1586. *.Z) TEMPFILE=$(mktemp)
  1587. .br
  1588. uncompress \-c $1 >$TEMPFILE 2>/dev/null
  1589. .br
  1590. if [ \-s $TEMPFILE ]; then
  1591. .br
  1592. echo $TEMPFILE
  1593. .br
  1594. else
  1595. .br
  1596. rm \-f $TEMPFILE
  1597. .br
  1598. fi
  1599. .br
  1600. ;;
  1601. .br
  1602. esac
  1603. .PP
  1604. lessclose.sh:
  1605. .br
  1606. #! /bin/sh
  1607. .br
  1608. rm $2
  1609. .PP
  1610. To use these scripts, put them both where they can be executed and
  1611. set LESSOPEN="lessopen.sh\ %s", and
  1612. LESSCLOSE="lessclose.sh\ %s\ %s".
  1613. More complex LESSOPEN and LESSCLOSE scripts may be written
  1614. to accept other types of compressed files, and so on.
  1615. .PP
  1616. It is also possible to set up an input preprocessor to
  1617. pipe the file data directly to
  1618. .BR less ,
  1619. rather than putting the data into a replacement file.
  1620. This avoids the need to decompress the entire file before
  1621. starting to view it.
  1622. An input preprocessor that works this way is called an input pipe.
  1623. An input pipe, instead of writing the name of a replacement file on
  1624. its standard output,
  1625. writes the entire contents of the replacement file on its standard output.
  1626. If the input pipe does not write any characters on its standard output,
  1627. then there is no replacement file and
  1628. .B less
  1629. uses the original file, as normal.
  1630. To use an input pipe,
  1631. make the first character in the LESSOPEN environment variable a
  1632. vertical bar (|) to signify that the input preprocessor is an input pipe.
  1633. As with non-pipe input preprocessors, the command string must contain one
  1634. occurrence of %s, which is replaced with the filename of the input file.
  1635. .PP
  1636. For example, on many Unix systems, this script will work like the
  1637. previous example scripts:
  1638. .PP
  1639. lesspipe.sh:
  1640. .br
  1641. #! /bin/sh
  1642. .br
  1643. case "$1" in
  1644. .br
  1645. *.Z) uncompress \-c $1 2>/dev/null
  1646. .br
  1647. ;;
  1648. .br
  1649. *) exit 1
  1650. .br
  1651. ;;
  1652. .br
  1653. esac
  1654. .br
  1655. exit $?
  1656. .br
  1657. .PP
  1658. To use this script, put it where it can be executed and set
  1659. LESSOPEN="|lesspipe.sh %s".
  1660. .PP
  1661. Note that a preprocessor cannot output an empty file, since that
  1662. is interpreted as meaning there is no replacement, and
  1663. the original file is used.
  1664. To avoid this, if LESSOPEN starts with two vertical bars,
  1665. the exit status of the script determines the behavior when the output is empty.
  1666. If the output is empty and the exit status is zero,
  1667. the empty output is considered to be replacement text.
  1668. If the output is empty and the exit status is nonzero,
  1669. the original file is used.
  1670. For compatibility with previous versions of
  1671. .BR less ,
  1672. if LESSOPEN starts with only one vertical bar, the exit status
  1673. of the preprocessor is ignored.
  1674. .PP
  1675. When an input pipe is used, a LESSCLOSE postprocessor can be used,
  1676. but it is usually not necessary since there is no replacement file
  1677. to clean up.
  1678. In this case, the replacement file name passed to the LESSCLOSE
  1679. postprocessor is "\-".
  1680. .PP
  1681. For compatibility with previous versions of
  1682. .BR less ,
  1683. the input preprocessor or pipe is not used if
  1684. .B less
  1685. is viewing standard input.
  1686. However, if the first character of LESSOPEN is a dash (\-),
  1687. the input preprocessor is used on standard input as well as other files.
  1688. In this case, the dash is not considered to be part of
  1689. the preprocessor command.
  1690. If standard input is being viewed, the input preprocessor is passed
  1691. a file name consisting of a single dash.
  1692. Similarly, if the first two characters of LESSOPEN are vertical bar and dash
  1693. (|\-) or two vertical bars and a dash (||\-),
  1694. the input pipe is used on standard input as well as other files.
  1695. Again, in this case the dash is not considered to be part of
  1696. the input pipe command.
  1697. .
  1698. .SH "NATIONAL CHARACTER SETS"
  1699. There are three types of characters in the input file:
  1700. .IP "normal characters"
  1701. can be displayed directly to the screen.
  1702. .IP "control characters"
  1703. should not be displayed directly, but are expected to be found
  1704. in ordinary text files (such as backspace and tab).
  1705. .IP "binary characters"
  1706. should not be displayed directly and are not expected to be found
  1707. in text files.
  1708. .PP
  1709. A "character set" is simply a description of which characters are to
  1710. be considered normal, control, and binary.
  1711. The LESSCHARSET environment variable may be used to select a character set.
  1712. Possible values for LESSCHARSET are:
  1713. .IP ascii
  1714. BS, TAB, NL, CR, and formfeed are control characters,
  1715. all chars with values between 32 and 126 are normal,
  1716. and all others are binary.
  1717. .IP iso8859
  1718. Selects an ISO 8859 character set.
  1719. This is the same as ASCII, except characters between 160 and 255 are
  1720. treated as normal characters.
  1721. .IP latin1
  1722. Same as iso8859.
  1723. .IP latin9
  1724. Same as iso8859.
  1725. .IP dos
  1726. Selects a character set appropriate for MS-DOS.
  1727. .IP ebcdic
  1728. Selects an EBCDIC character set.
  1729. .IP IBM-1047
  1730. Selects an EBCDIC character set used by OS/390 Unix Services.
  1731. This is the EBCDIC analogue of latin1. You get similar results
  1732. by setting either LESSCHARSET=IBM-1047 or LC_CTYPE=en_US
  1733. in your environment.
  1734. .IP koi8-r
  1735. Selects a Russian character set.
  1736. .IP next
  1737. Selects a character set appropriate for NeXT computers.
  1738. .IP utf-8
  1739. Selects the UTF-8 encoding of the ISO 10646 character set.
  1740. UTF-8 is special in that it supports multi-byte characters in the input file.
  1741. It is the only character set that supports multi-byte characters.
  1742. .IP windows
  1743. Selects a character set appropriate for Microsoft Windows (cp 1251).
  1744. .PP
  1745. In rare cases, it may be desired to tailor
  1746. .B less
  1747. to use a character set other than the ones definable by LESSCHARSET.
  1748. In this case, the environment variable LESSCHARDEF can be used
  1749. to define a character set.
  1750. It should be set to a string where each character in the string represents
  1751. one character in the character set.
  1752. The character ".\&" is used for a normal character, "c" for control,
  1753. and "b" for binary.
  1754. A decimal number may be used for repetition.
  1755. For example, "bccc4b.\&" would mean character 0 is binary,
  1756. 1, 2 and 3 are control, 4, 5, 6 and 7 are binary, and 8 is normal.
  1757. All characters after the last are taken to be the same as the last,
  1758. so characters 9 through 255 would be normal.
  1759. (This is an example, and does not necessarily
  1760. represent any real character set.)
  1761. .PP
  1762. This table shows the value of LESSCHARDEF which is equivalent
  1763. to each of the possible values for LESSCHARSET:
  1764. .
  1765. .RS 5m
  1766. .TS
  1767. l l.
  1768. ascii 8bcccbcc18b95.b
  1769. dos 8bcccbcc12bc5b95.b.
  1770. ebcdic 5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b
  1771. 9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b.
  1772. IBM-1047 4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc
  1773. 191.b
  1774. iso8859 8bcccbcc18b95.33b.
  1775. koi8-r 8bcccbcc18b95.b128.
  1776. latin1 8bcccbcc18b95.33b.
  1777. next 8bcccbcc18b95.bb125.bb
  1778. .TE
  1779. .RE
  1780. .PP
  1781. If neither LESSCHARSET nor LESSCHARDEF is set,
  1782. but any of the strings "UTF-8", "UTF8", "utf-8" or "utf8"
  1783. is found in the LC_ALL, LC_CTYPE or LANG
  1784. environment variables, then the default character set is utf-8.
  1785. .PP
  1786. If that string is not found, but your system supports the
  1787. .B setlocale
  1788. interface,
  1789. .B less
  1790. will use setlocale to determine the character set.
  1791. setlocale is controlled by setting the LANG or LC_CTYPE environment
  1792. variables.
  1793. .PP
  1794. Finally, if the
  1795. .I setlocale
  1796. interface is also not available, the default character set is latin1.
  1797. .PP
  1798. Control and binary characters are displayed in standout (reverse video).
  1799. Each such character is displayed in caret notation if possible
  1800. (e.g.\& \(haA for control-A). Caret notation is used only if
  1801. inverting the 0100 bit results in a normal printable character.
  1802. Otherwise, the character is displayed as a hex number in angle brackets.
  1803. This format can be changed by
  1804. setting the LESSBINFMT environment variable.
  1805. LESSBINFMT may begin with a "*" and one character to select
  1806. the display attribute:
  1807. "*k" is blinking, "*d" is bold, "*u" is underlined, "*s" is standout,
  1808. and "*n" is normal.
  1809. If LESSBINFMT does not begin with a "*", normal attribute is assumed.
  1810. The remainder of LESSBINFMT is a string which may include one
  1811. printf-style escape sequence (a % followed by x, X, o, d, etc.).
  1812. For example, if LESSBINFMT is "*u[%x]", binary characters
  1813. are displayed in underlined hexadecimal surrounded by brackets.
  1814. The default if no LESSBINFMT is specified is "*s<%02X>".
  1815. Warning: the result of expanding the character via LESSBINFMT must
  1816. be less than 31 characters.
  1817. .PP
  1818. When the character set is utf-8, the LESSUTFBINFMT environment variable
  1819. acts similarly to LESSBINFMT but it applies to Unicode code points
  1820. that were successfully decoded but are unsuitable for display (e.g.,
  1821. unassigned code points).
  1822. Its default value is "<U+%04lX>".
  1823. Note that LESSUTFBINFMT and LESSBINFMT share their display attribute
  1824. setting ("*x") so specifying one will affect both;
  1825. LESSUTFBINFMT is read after LESSBINFMT so its setting, if any,
  1826. will have priority.
  1827. Problematic octets in a UTF-8 file (octets of a truncated sequence,
  1828. octets of a complete but non-shortest form sequence, invalid octets,
  1829. and stray trailing octets)
  1830. are displayed individually using LESSBINFMT so as to facilitate diagnostic
  1831. of how the UTF-8 file is ill-formed.
  1832. .PP
  1833. When the character set is utf-8, in rare cases it may be desirable to
  1834. override the Unicode definition of the type of certain characters.
  1835. For example, characters in a Private Use Area are normally treated as control
  1836. characters, but if you are using a custom font with printable characters
  1837. in that range, it may be desirable to tell
  1838. .B less
  1839. to treat such characters as printable.
  1840. This can be done by setting the LESSUTFCHARDEF environment variable
  1841. to a comma-separated list of
  1842. .I "character type"
  1843. definitions.
  1844. Each character type definition consists of either one hexadecimal codepoint
  1845. or a pair of codepoints separated by a dash,
  1846. followed by a colon and a type character.
  1847. Each hexadecimal codepoint may optionally be preceded by a "U" or "U+".
  1848. If a pair of codepoints is given, the type is set for
  1849. all characters inclusively between the two values.
  1850. If there are multiple comma-separated codepoint values,
  1851. they must be in ascending numerical order.
  1852. The type character may be one of:
  1853. .RS
  1854. .IP "p"
  1855. A normal printable character.
  1856. .IP "w"
  1857. A wide (2-space) printable character.
  1858. .IP "b"
  1859. A binary (non-printable) character.
  1860. .IP "c"
  1861. A composing (zero width) character.
  1862. .RE
  1863. .PP
  1864. For example, setting LESSUTFCHARDEF to
  1865. .nf
  1866. .sp
  1867. E000-F8FF:p,F0000-FFFFD:p,100000-10FFFD:p
  1868. .sp
  1869. .fi
  1870. would make all Private Use Area characters be treated as printable.
  1871. .SH "PROMPTS"
  1872. The \-P option allows you to tailor the prompt to your preference.
  1873. The string given to the \-P option replaces the specified prompt string.
  1874. Certain characters in the string are interpreted specially.
  1875. The prompt mechanism is rather complicated to provide flexibility,
  1876. but the ordinary user need not understand the details of constructing
  1877. personalized prompt strings.
  1878. .sp
  1879. A percent sign followed by a single character is expanded
  1880. according to what the following character is.
  1881. (References to the input file size below refer to the preprocessed size,
  1882. if an input preprocessor is being used.)
  1883. .IP "%b\fIX\fP"
  1884. Replaced by the byte offset into the current input file.
  1885. The b is followed by a single character (shown as \fIX\fP above)
  1886. which specifies the line whose byte offset is to be used.
  1887. If the character is a "t", the byte offset of the top line in the
  1888. display is used,
  1889. an "m" means use the middle line,
  1890. a "b" means use the bottom line,
  1891. a "B" means use the line just after the bottom line,
  1892. and a "j" means use the "target" line, as specified by the \-j option.
  1893. .IP "%B"
  1894. Replaced by the size of the current input file.
  1895. .IP "%c"
  1896. Replaced by the column number of the text appearing in the first
  1897. column of the screen.
  1898. .IP "%d\fIX\fP"
  1899. Replaced by the page number of a line in the input file.
  1900. The line to be used is determined by the \fIX\fP, as with the %b option.
  1901. .IP "%D"
  1902. Replaced by the number of pages in the input file,
  1903. or equivalently, the page number of the last line in the input file.
  1904. .IP "%E"
  1905. Replaced by the name of the editor (from the VISUAL environment variable,
  1906. or the EDITOR environment variable if VISUAL is not defined).
  1907. See the discussion of the LESSEDIT feature below.
  1908. .IP "%f"
  1909. Replaced by the name of the current input file.
  1910. .IP "%F"
  1911. Replaced by the last component of the name of the current input file.
  1912. .IP "%g"
  1913. Replaced by the shell-escaped name of the current input file.
  1914. This is useful when the expanded string will be used in a shell command,
  1915. such as in LESSEDIT.
  1916. .IP "%i"
  1917. Replaced by the index of the current file in the list of
  1918. input files.
  1919. .IP "%l\fIX\fP"
  1920. Replaced by the line number of a line in the input file.
  1921. The line to be used is determined by the \fIX\fP, as with the %b option.
  1922. .IP "%L"
  1923. Replaced by the line number of the last line in the input file.
  1924. .IP "%m"
  1925. Replaced by the total number of input files.
  1926. .IP "%p\fIX\fP"
  1927. Replaced by the percent into the current input file, based on byte offsets.
  1928. The line used is determined by the \fIX\fP as with the %b option.
  1929. .IP "%P\fIX\fP"
  1930. Replaced by the percent into the current input file, based on line numbers.
  1931. The line used is determined by the \fIX\fP as with the %b option.
  1932. .IP "%s"
  1933. Same as %B.
  1934. .IP "%t"
  1935. Causes any trailing spaces to be removed.
  1936. Usually used at the end of the string, but may appear anywhere.
  1937. .IP "%T"
  1938. Normally expands to the word "file".
  1939. However if viewing files via a tags list using the \-t option,
  1940. it expands to the word "tag".
  1941. .IP "%x"
  1942. Replaced by the name of the next input file in the list.
  1943. .PP
  1944. If any item is unknown (for example, the file size if input
  1945. is a pipe), a question mark is printed instead.
  1946. .PP
  1947. The format of the prompt string can be changed
  1948. depending on certain conditions.
  1949. A question mark followed by a single character acts like an "IF":
  1950. depending on the following character, a condition is evaluated.
  1951. If the condition is true, any characters following the question mark
  1952. and condition character, up to a period, are included in the prompt.
  1953. If the condition is false, such characters are not included.
  1954. A colon appearing between the question mark and the
  1955. period can be used to establish an "ELSE": any characters between
  1956. the colon and the period are included in the string if and only if
  1957. the IF condition is false.
  1958. Condition characters (which follow a question mark) may be:
  1959. .IP "?a"
  1960. True if any characters have been included in the prompt so far.
  1961. .IP "?b\fIX\fP"
  1962. True if the byte offset of the specified line is known.
  1963. .IP "?B"
  1964. True if the size of current input file is known.
  1965. .IP "?c"
  1966. True if the text is horizontally shifted (%c is not zero).
  1967. .IP "?d\fIX\fP"
  1968. True if the page number of the specified line is known.
  1969. .IP "?e"
  1970. True if at end-of-file.
  1971. .IP "?f"
  1972. True if there is an input filename
  1973. (that is, if input is not a pipe).
  1974. .IP "?l\fIX\fP"
  1975. True if the line number of the specified line is known.
  1976. .IP "?L"
  1977. True if the line number of the last line in the file is known.
  1978. .IP "?m"
  1979. True if there is more than one input file.
  1980. .IP "?n"
  1981. True if this is the first prompt in a new input file.
  1982. .IP "?p\fIX\fP"
  1983. True if the percent into the current input file, based on byte offsets,
  1984. of the specified line is known.
  1985. .IP "?P\fIX\fP"
  1986. True if the percent into the current input file, based on line numbers,
  1987. of the specified line is known.
  1988. .IP "?s"
  1989. Same as "?B".
  1990. .IP "?x"
  1991. True if there is a next input file
  1992. (that is, if the current input file is not the last one).
  1993. .PP
  1994. Any characters other than the special ones
  1995. (question mark, colon, period, percent, and backslash)
  1996. become literally part of the prompt.
  1997. Any of the special characters may be included in the prompt literally
  1998. by preceding it with a backslash.
  1999. .PP
  2000. Some examples:
  2001. .sp
  2002. ?f%f:Standard input.
  2003. .sp
  2004. This prompt prints the filename, if known;
  2005. otherwise the string "Standard input".
  2006. .sp
  2007. ?f%f \&.?ltLine %lt:?pt%pt\e%:?btByte %bt:-...
  2008. .sp
  2009. This prompt would print the filename, if known.
  2010. The filename is followed by the line number, if known,
  2011. otherwise the percent if known, otherwise the byte offset if known.
  2012. Otherwise, a dash is printed.
  2013. Notice how each question mark has a matching period,
  2014. and how the % after the %pt
  2015. is included literally by escaping it with a backslash.
  2016. .sp
  2017. ?n?f%f\ .?m(%T %i of %m)\ ..?e(END)\ ?x-\ Next\e:\ %x..%t";
  2018. .sp
  2019. This prints the filename if this is the first prompt in a file,
  2020. followed by the "file N of N" message if there is more
  2021. than one input file.
  2022. Then, if we are at end-of-file, the string "(END)" is printed
  2023. followed by the name of the next file, if there is one.
  2024. Finally, any trailing spaces are truncated.
  2025. This is the default prompt.
  2026. For reference, here are the defaults for
  2027. the other two prompts (\-m and \-M respectively).
  2028. Each is broken into two lines here for readability only.
  2029. .nf
  2030. .sp
  2031. ?n?f%f\ .?m(%T\ %i\ of\ %m)\ ..?e(END)\ ?x-\ Next\e:\ %x.:
  2032. ?pB%pB\e%:byte\ %bB?s/%s...%t
  2033. .sp
  2034. ?f%f\ .?n?m(%T\ %i\ of\ %m)\ ..?ltlines\ %lt-%lb?L/%L.\ :
  2035. byte\ %bB?s/%s.\ .?e(END)\ ?x-\ Next\e:\ %x.:?pB%pB\e%..%t
  2036. .sp
  2037. .fi
  2038. And here is the default message produced by the = command:
  2039. .nf
  2040. .sp
  2041. ?f%f\ .?m(%T\ %i\ of\ %m)\ .?ltlines\ %lt-%lb?L/%L.\ .
  2042. byte\ %bB?s/%s.\ ?e(END)\ :?pB%pB\e%..%t
  2043. .fi
  2044. .PP
  2045. The prompt expansion features are also used for another purpose:
  2046. if an environment variable LESSEDIT is defined, it is used
  2047. as the command to be executed when the v command is invoked.
  2048. The LESSEDIT string is expanded in the same way as the prompt strings.
  2049. The default value for LESSEDIT is:
  2050. .nf
  2051. .sp
  2052. %E\ ?lm+%lm.\ %g
  2053. .sp
  2054. .fi
  2055. Note that this expands to the editor name, followed by a + and the
  2056. line number, followed by the shell-escaped file name.
  2057. If your editor does not accept the "+linenumber" syntax, or has other
  2058. differences in invocation syntax, the LESSEDIT variable can be
  2059. changed to modify this default.
  2060. .
  2061. .SH SECURITY
  2062. When the environment variable LESSSECURE is set to 1,
  2063. .B less
  2064. runs in a "secure" mode.
  2065. This means these features are disabled:
  2066. .RS
  2067. .IP "!"
  2068. the shell command
  2069. .IP "#"
  2070. the pshell command
  2071. .IP "|"
  2072. the pipe command
  2073. .IP ":e"
  2074. the examine command.
  2075. .IP "v"
  2076. the editing command
  2077. .IP "s \-o"
  2078. log files
  2079. .IP "\-k"
  2080. use of lesskey files
  2081. .IP "\-t"
  2082. use of tags files
  2083. .IP
  2084. metacharacters in filenames, such as *
  2085. .IP
  2086. filename completion (TAB, \(haL)
  2087. .IP
  2088. history file
  2089. .RE
  2090. .PP
  2091. Less can also be compiled to be permanently in "secure" mode.
  2092. .
  2093. .SH "COMPATIBILITY WITH MORE"
  2094. If the environment variable LESS_IS_MORE is set to 1,
  2095. or if the program is invoked via a file link named "more",
  2096. .B less
  2097. behaves (mostly) in conformance with the POSIX
  2098. .BR more (1)
  2099. command specification.
  2100. In this mode, less behaves differently in these ways:
  2101. .PP
  2102. The \-e option works differently.
  2103. If the \-e option is not set,
  2104. .B less
  2105. behaves as if the \-e option were set.
  2106. If the \-e option is set,
  2107. .B less
  2108. behaves as if the \-E option were set.
  2109. .PP
  2110. The \-m option works differently.
  2111. If the \-m option is not set, the medium prompt is used,
  2112. and it is prefixed with the string "\-\-More\-\-".
  2113. If the \-m option is set, the short prompt is used.
  2114. .PP
  2115. The \-n option acts like the \-z option.
  2116. The normal behavior of the \-n option is unavailable in this mode.
  2117. .PP
  2118. The parameter to the \-p option is taken to be a
  2119. .B less
  2120. command rather than a search pattern.
  2121. .PP
  2122. The LESS environment variable is ignored,
  2123. and the MORE environment variable is used in its place.
  2124. .
  2125. .SH "ENVIRONMENT VARIABLES"
  2126. Environment variables may be specified either in the system environment
  2127. as usual, or in a
  2128. .BR lesskey (1)
  2129. file.
  2130. If environment variables are defined in more than one place,
  2131. variables defined in a local lesskey file take precedence over
  2132. variables defined in the system environment, which take precedence
  2133. over variables defined in the system-wide lesskey file.
  2134. .IP COLUMNS
  2135. Sets the number of columns on the screen.
  2136. Takes precedence over the number of columns specified by the TERM variable.
  2137. (But if you have a windowing system which supports TIOCGWINSZ or WIOCGETD,
  2138. the window system's idea of the screen size takes precedence over the
  2139. LINES and COLUMNS environment variables.)
  2140. .IP EDITOR
  2141. The name of the editor (used for the v command).
  2142. .IP HOME
  2143. Name of the user's home directory
  2144. (used to find a lesskey file on Unix and OS/2 systems).
  2145. .IP "HOMEDRIVE, HOMEPATH"
  2146. Concatenation of the HOMEDRIVE and HOMEPATH environment variables is
  2147. the name of the user's home directory if the HOME variable is not set
  2148. (only in the Windows version).
  2149. .IP INIT
  2150. Name of the user's init directory (used to find a lesskey file on OS/2 systems).
  2151. .IP LANG
  2152. Language for determining the character set.
  2153. .IP LC_CTYPE
  2154. Language for determining the character set.
  2155. .IP LESS
  2156. Options which are passed to
  2157. .B less
  2158. automatically.
  2159. .IP LESSANSIENDCHARS
  2160. Characters which may end an ANSI color escape sequence
  2161. (default "m").
  2162. .IP LESSANSIMIDCHARS
  2163. Characters which may appear between the ESC character and the
  2164. end character in an ANSI color escape sequence
  2165. (default "0123456789:;[?!"\(aq#%()*+\ ".
  2166. .IP LESSBINFMT
  2167. Format for displaying non-printable, non-control characters.
  2168. .IP LESSCHARDEF
  2169. Defines a character set.
  2170. .IP LESSCHARSET
  2171. Selects a predefined character set.
  2172. .IP LESSCLOSE
  2173. Command line to invoke the (optional) input-postprocessor.
  2174. .IP LESSECHO
  2175. Name of the lessecho program (default "lessecho").
  2176. The lessecho program is needed to expand metacharacters, such as * and ?,
  2177. in filenames on Unix systems.
  2178. .IP LESSEDIT
  2179. Editor prototype string (used for the v command).
  2180. See discussion under PROMPTS.
  2181. .IP LESSGLOBALTAGS
  2182. Name of the command used by the \-t option to find global tags.
  2183. Normally should be set to "global" if your system has the
  2184. .BR global (1)
  2185. command. If not set, global tags are not used.
  2186. .IP LESSHISTFILE
  2187. Name of the history file used to remember search commands and
  2188. shell commands between invocations of
  2189. .BR less .
  2190. If set to "\-" or "/dev/null", a history file is not used.
  2191. The default depends on the operating system, but is usually:
  2192. .RS
  2193. .IP "Linux and Unix"
  2194. "$XDG_STATE_HOME/lesshst" or "$HOME/.local/state/lesshst" or
  2195. "$XDG_DATA_HOME/lesshst" or "$HOME/.lesshst".
  2196. .IP "Windows and MS-DOS"
  2197. "$HOME/_lesshst".
  2198. .IP "OS/2"
  2199. "$HOME/lesshst.ini" or "$INIT/lesshst.ini".
  2200. .RE
  2201. .IP LESSHISTSIZE
  2202. The maximum number of commands to save in the history file.
  2203. The default is 100.
  2204. .IP LESSKEYIN
  2205. Name of the default
  2206. .I "lesskey source"
  2207. file.
  2208. .IP LESSKEY
  2209. Name of the default
  2210. .I "lesskey binary"
  2211. file. (Not used if "$LESSKEYIN" exists.)
  2212. .IP LESSKEYIN_SYSTEM
  2213. Name of the default system-wide
  2214. .I "lesskey source"
  2215. file.
  2216. .IP LESSKEY_SYSTEM
  2217. Name of the default system-wide
  2218. .I "lesskey binary"
  2219. file. (Not used if "$LESSKEYIN_SYSTEM" exists.)
  2220. .IP LESSMETACHARS
  2221. List of characters which are considered "metacharacters" by the shell.
  2222. .IP LESSMETAESCAPE
  2223. Prefix which less will add before each metacharacter in a
  2224. command sent to the shell.
  2225. If LESSMETAESCAPE is an empty string, commands containing
  2226. metacharacters will not be passed to the shell.
  2227. .IP LESSOPEN
  2228. Command line to invoke the (optional) input-preprocessor.
  2229. .IP LESSSECURE
  2230. Runs less in "secure" mode.
  2231. See discussion under SECURITY.
  2232. .IP LESSSEPARATOR
  2233. String to be appended to a directory name in filename completion.
  2234. .IP LESSUTFBINFMT
  2235. Format for displaying non-printable Unicode code points.
  2236. .IP LESSUTFCHARDEF
  2237. Overrides the type of specified Unicode characters.
  2238. .IP LESS_COLUMNS
  2239. Sets the number of columns on the screen.
  2240. Unlike COLUMNS, takes precedence over the system's idea of the screen size,
  2241. so it can be used to make
  2242. .B less
  2243. use less than the full screen width.
  2244. If set to a negative number, sets the number of columns used to
  2245. this much less than the actual screen width.
  2246. .IP LESS_LINES
  2247. Sets the number of lines on the screen.
  2248. Unlike LINES, takes precedence over the system's idea of the screen size,
  2249. so it can be used to make
  2250. .B less
  2251. use less than the full screen height.
  2252. If set to a negative number, sets the number of lines used to
  2253. this much less than the actual screen height.
  2254. When set,
  2255. .B less
  2256. repaints the entire screen on every movement command,
  2257. so scrolling may be slower.
  2258. .IP LESS_DATA_DELAY
  2259. Duration (in milliseconds) after starting to read data from the input,
  2260. after which the "Waiting for data" message will be displayed.
  2261. The default is 4000 (4 seconds).
  2262. .IP LESS_IS_MORE
  2263. Emulate the
  2264. .BR more (1)
  2265. command.
  2266. .IP LESS_TERMCAP_xx
  2267. Where "xx" is any two characters, overrides the definition
  2268. of the termcap "xx" capability for the terminal.
  2269. .IP LINES
  2270. Sets the number of lines on the screen.
  2271. Takes precedence over the number of lines specified by the TERM variable.
  2272. (But if you have a windowing system which supports TIOCGWINSZ or WIOCGETD,
  2273. the window system's idea of the screen size takes precedence over the
  2274. LINES and COLUMNS environment variables.)
  2275. .IP MORE
  2276. Options which are passed to
  2277. .B less
  2278. automatically when running in
  2279. .BR more "-compatible mode."
  2280. .IP PATH
  2281. User's search path (used to find a lesskey file
  2282. on MS-DOS and OS/2 systems).
  2283. .IP SHELL
  2284. The shell used to execute the !\& command, as well as to expand filenames.
  2285. .IP TERM
  2286. The type of terminal on which
  2287. .B less
  2288. is being run.
  2289. .IP VISUAL
  2290. The name of the editor (used for the v command).
  2291. .IP XDG_CONFIG_HOME
  2292. Possible location of the
  2293. .B lesskey
  2294. file; see the KEY BINDINGS section.
  2295. .IP XDG_DATA_HOME
  2296. Possible location of the history file; see the description of the LESSHISTFILE environment variable.
  2297. .IP XDG_STATE_HOME
  2298. Possible location of the history file; see the description of the LESSHISTFILE environment variable.
  2299. .
  2300. .SH "SEE ALSO"
  2301. .BR lesskey (1),
  2302. .BR lessecho (1)
  2303. .
  2304. .SH COPYRIGHT
  2305. Copyright (C) 1984-2023 Mark Nudelman
  2306. .PP
  2307. less is part of the GNU project and is free software.
  2308. You can redistribute it and/or modify it
  2309. under the terms of either
  2310. (1) the GNU General Public License as published by
  2311. the Free Software Foundation; or (2) the Less License.
  2312. See the file README in the less distribution for more details
  2313. regarding redistribution.
  2314. You should have received a copy of the GNU General Public License
  2315. along with the source for less; see the file COPYING.
  2316. If not, write to the Free Software Foundation, 59 Temple Place,
  2317. Suite 330, Boston, MA 02111-1307, USA.
  2318. You should also have received a copy of the Less License;
  2319. see the file LICENSE.
  2320. .PP
  2321. less is distributed in the hope that it will be useful, but
  2322. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  2323. or FITNESS FOR A PARTICULAR PURPOSE.
  2324. See the GNU General Public License for more details.
  2325. .
  2326. .SH AUTHOR
  2327. .
  2328. Mark Nudelman
  2329. .br
  2330. Report bugs at https://github.com/gwsw/less/issues.
  2331. .br
  2332. For more information, see the less homepage at
  2333. .br
  2334. https://greenwoodsoftware.com/less