3 less \- opposite of more
7 .B "less [-[+]aBcCdeEfHimMnNqQrsSuUw]"
9 .B " [-b \fIbufs\fP] [-h \fIlines\fP] [-j \fIline\fP] [-k \fIkeyfile\fP]"
11 .B " [-{oO} \fIlogfile\fP] [-p \fIpattern\fP] [-P \fIprompt\fP] [-t \fItag\fP]"
13 .B " [-T \fItagfile\fP] [-x \fItab\fP] [-y \fIlines\fP] [-[z] \fIlines\fP]"
15 .B " [+[+]\fIcmd\fP] [\fIfilename\fP]..."
19 is a program similar to
21 (1), but which allows backward movement
22 in the file as well as forward movement.
25 does not have to read the entire input file before starting,
26 so with large input files it starts up faster than text editors like
30 uses termcap (or terminfo on some systems),
31 so it can run on a variety of terminals.
32 There is even limited support for hardcopy terminals.
33 (On a hardcopy terminal, lines which should be printed at the top
34 of the screen are prefixed with an up-arrow.)
36 Commands are based on both
40 Commands may be preceded by a decimal number,
41 called N in the descriptions below.
42 The number is used by some commands, as indicated.
45 In the following descriptions, ^X means control-X.
46 ESC stands for the ESCAPE key; for example ESC-v means the
47 two character sequence "ESCAPE", then "v".
49 Help: display a summary of these commands.
50 If you forget all the other commands, remember this one.
52 .IP "SPACE or ^V or f or ^F"
53 Scroll forward N lines, default one window (see option -z below).
54 If N is more than the screen size, only the final screenful is displayed.
55 Warning: some systems use ^V as a special literalization character.
58 Like SPACE, but if N is specified, it becomes the new window size.
60 .IP "RETURN or ^N or e or ^E or j or ^J"
61 Scroll forward N lines, default 1.
62 The entire N lines are displayed, even if N is more than the screen size.
65 Scroll forward N lines, default one half of the screen size.
66 If N is specified, it becomes the new default for
67 subsequent d and u commands.
69 .IP "b or ^B or ESC-v"
70 Scroll backward N lines, default one window (see option -z below).
71 If N is more than the screen size, only the final screenful is displayed.
74 Like ESC-v, but if N is specified, it becomes the new window size.
76 .IP "y or ^Y or ^P or k or ^K"
77 Scroll backward N lines, default 1.
78 The entire N lines are displayed, even if N is more than the screen size.
79 Warning: some systems use ^Y as a special job control character.
82 Scroll backward N lines, default one half of the screen size.
83 If N is specified, it becomes the new default for
84 subsequent d and u commands.
90 Repaint the screen, discarding any buffered input.
91 Useful if the file is changing while it is being viewed.
94 Scroll forward, and keep trying to read when the
95 end of file is reached.
96 Normally this command would be used when already at the end of the file.
97 It is a way to monitor the tail of a file which is growing
98 while it is being viewed.
99 (The behavior is similar to the "tail -f" command.)
101 .IP "g or < or ESC-<"
102 Go to line N in the file, default 1 (beginning of file).
103 (Warning: this may be slow if N is large.)
105 .IP "G or > or ESC->"
106 Go to line N in the file, default the end of the file.
107 (Warning: this may be slow if N is large,
108 or if N is not specified and
109 standard input, rather than a file, is being read.)
112 Go to a position N percent into the file.
113 N should be between 0 and 100.
114 (This works if standard input is being read, but only if
116 has already read to the end of the file.
117 It is always fast, but not always useful.)
120 If a left curly bracket appears in the top line displayed
122 the { command will go to the matching right curly bracket.
123 The matching right curly bracket is positioned on the bottom
125 If there is more than one left curly bracket on the top line,
126 a number N may be used to specify the N-th bracket on the line.
129 If a right curly bracket appears in the bottom line displayed
131 the } command will go to the matching left curly bracket.
132 The matching left curly bracket is positioned on the top
134 If there is more than one right curly bracket on the top line,
135 a number N may be used to specify the N-th bracket on the line.
138 Like {, but applies to parentheses rather than curly brackets.
141 Like }, but applies to parentheses rather than curly brackets.
144 Like {, but applies to square brackets rather than curly brackets.
147 Like }, but applies to square brackets rather than curly brackets.
150 Followed by two characters,
151 acts like {, but uses the two characters as open and close brackets,
153 For example, "ESC ^F < >" could be used to
154 go forward to the > which matches the < in the top displayed line.
156 Followed by two characters,
157 acts like }, but uses the two characters as open and close brackets,
159 For example, "ESC ^B < >" could be used to
160 go backward to the < which matches the > in the bottom displayed line.
162 Followed by any lowercase letter,
163 marks the current position with that letter.
167 Followed by any lowercase letter, returns to the position which
168 was previously marked with that letter.
169 Followed by another single quote, returns to the position at
170 which the last "large" movement command was executed.
171 Followed by a ^ or $, jumps to the beginning or end of the
173 Marks are preserved when a new file is examined,
174 so the ' command can be used to switch between input files.
177 Same as single quote.
180 Search forward in the file for the N-th line containing the pattern.
182 The pattern is a regular expression, as recognized by
184 The search starts at the second line displayed
185 (but see the -a and -j options, which change this).
187 Certain characters are special
188 if entered at the beginning of the pattern;
189 they modify the type of search rather than become part of the pattern:
192 Search for lines which do NOT match the pattern.
194 Search multiple files.
195 That is, if the search reaches the end of the current file
196 without finding a match,
197 the search continues in the next file in the command line list.
199 Begin the search at the first line of the first file
200 in the command line list,
201 regardless of what is currently displayed on the screen
202 or the settings of the -a or -j options.
206 Search backward in the file for the N-th line containing the pattern.
207 The search starts at the line immediately before the top line displayed.
209 Certain characters are special as in the / command:
212 Search for lines which do NOT match the pattern.
214 Search multiple files.
215 That is, if the search reaches the beginning of the current file
216 without finding a match,
217 the search continues in the previous file in the command line list.
219 Begin the search at the last line of the last file
220 in the command line list,
221 regardless of what is currently displayed on the screen
222 or the settings of the -a or -j options.
232 Repeat previous search, for N-th line containing the last pattern.
233 If the previous search was modified by !, the search is made for the
234 N-th line NOT containing the pattern.
235 If the previous search was modified by *, the search continues
236 in the next (or previous) file if not satisfied in the current file.
237 There is no effect if the previous search was modified by @.
240 Repeat previous search, but in the reverse direction.
243 Repeat previous search, but crossing file boundaries.
244 The effect is as if the previous search were modified by *.
247 Repeat previous search, but in the reverse direction
248 and crossing file boundaries.
252 If the filename is missing, the "current" file (see the :n and :p commands
253 below) from the list of files in the command line is re-examined.
254 A percent sign (%) in the filename is replaced by the name of the
256 A pound sign (#) is replaced by the name of the previously examined file.
257 The filename is inserted into the command line list of files
258 so that it can be seen by subsequent :n and :p commands.
259 If the filename consists of several files, they are all inserted into
260 the list of files and the first one is examined.
264 Warning: some systems use ^V as a special literalization character.
267 Examine the next file (from the list of files given in the command line).
268 If a number N is specified, the N-th next file is examined.
271 Examine the previous file in the command line list.
272 If a number N is specified, the N-th previous file is examined.
275 Examine the first file in the command line list.
276 If a number N is specified, the N-th file in the list is examined.
279 Prints some information about the file being viewed,
281 and the line number and byte offset of the bottom line being displayed.
282 If possible, it also prints the length of the file,
283 the number of lines in the file
284 and the percent of the file above the last displayed line.
287 Followed by one of the command line option letters (see below),
288 this will change the setting of that option
289 and print a message describing the new setting.
290 If the option letter has a numeric value (such as -b or -h),
291 or a string value (such as -P or -t),
292 a new value may be entered after the option letter.
293 If no new value is entered, a message describing
294 the current setting is printed and nothing is changed.
297 Followed by one of the command line option letters (see below),
298 this will reset the option to its default setting
299 and print a message describing the new setting.
300 (The "\-+\fIX\fP" command does the same thing
301 as "\-+\fIX\fP" on the command line.)
302 This does not work for string-valued options.
305 Followed by one of the command line option letters (see below),
306 this will reset the option to the "opposite" of its default setting
307 and print a message describing the new setting.
308 (The "\-\-\fIX\fP" command does the same thing
309 as "\-\fIX\fP" on the command line.)
310 This does not work for numeric or string-valued options.
314 Followed by one of the command line option letters (see below),
315 this will print a message describing the current setting of that option.
316 The setting of the option is not changed.
319 Causes the specified cmd to be executed each time a new file is examined.
320 For example, +G causes
322 to initially display each file starting at the end
323 rather than the beginning.
326 Prints the version number of
330 .IP "q or :q or :Q or ZZ or ESC ESC"
336 commands may or may not be valid, depending on your particular installation.
339 Invokes an editor to edit the current file being viewed.
340 The editor is taken from the environment variable EDITOR,
342 See also the discussion of LESSEDIT under the section on PROMPTS below.
344 .IP "! shell-command"
345 Invokes a shell to run the shell-command given.
346 A percent sign (%) in the command is replaced by the name of the
348 A pound sign (#) is replaced by the name of the previously examined file.
349 "!!" repeats the last shell command.
350 "!" with no shell command simply invokes a shell.
351 In all cases, the shell is taken from the environment variable SHELL,
354 .IP "| <m> shell-command"
355 <m> represents any mark letter.
356 Pipes a section of the input file to the given shell command.
357 The section of the file to be piped is between the first line on
358 the current screen and the position marked by the letter.
359 <m> may also be ^ or $ to indicate beginning or end of file respectively.
360 If <m> is . or newline, the current screen is piped.
363 Command line options are described below.
364 Most options may be changed while
366 is running, via the "\-" command.
368 Options are also taken from the environment variable "LESS".
370 to avoid typing "less -options ..." each time
372 is invoked, you might tell
375 setenv LESS "-options"
380 LESS="-options"; export LESS
382 The environment variable is parsed before the command line,
383 so command line options override the LESS environment variable.
384 If an option appears in the LESS variable, it can be reset
385 to its default on the command line by beginning the command
386 line option with "-+".
388 A dollar sign ($) may be used to signal the end of an option string.
389 This is important only for options like -P which take a
392 This option displays a summary of the commands accepted by
394 (the same as the h command).
395 If this option is given, all other options are ignored, and
397 exits after the help screen is viewed.
398 (Depending on how your shell interprets the question mark,
399 it may be necessary to quote the question mark, thus: "-\\?".)
401 Causes searches to start after the last line
402 displayed on the screen,
403 thus skipping all lines displayed on the screen.
404 By default, searches start at the second line on the screen
405 (or after the last found line; see the -j option).
409 to use a non-standard number of buffers.
410 Buffers are 1K, and by default 10 buffers are used
411 (except if data in coming from standard input; see the -B option).
412 The number \fIn\fP specifies a different number of buffers to use.
414 Disables automatic allocation of buffers,
415 so that only the default number of buffers are used.
416 If more data is read than will fit in the buffers, the oldest
418 By default, when data is coming from standard input,
419 buffers are allocated automatically as needed
420 to avoid loss of data.
422 Causes full screen repaints to be painted from the top line down.
424 full screen repaints are done by scrolling from the bottom of the screen.
426 The -C option is like -c, but the screen is cleared before it is repainted.
428 The -d option suppresses the error message
429 normally displayed if the terminal is dumb;
430 that is, lacks some important capability,
431 such as the ability to clear the screen or scroll backward.
432 The -d option does not otherwise change the behavior of
438 to automatically exit
439 the second time it reaches end-of-file.
440 By default, the only way to exit
442 is via the "q" command.
446 to automatically exit the first time it reaches end-of-file.
448 Forces non-regular files to be opened.
449 (A non-regular file is a directory or a device special file.)
450 Also suppresses the warning message when a binary file is opened.
453 will refuse to open non-regular files.
455 Specifies a maximum number of lines to scroll backward.
456 If it is necessary to scroll backward more than \fIn\fP lines,
457 the screen is repainted in a forward direction instead.
458 (If the terminal does not have the ability to scroll
459 backward, -h0 is implied.)
461 Causes searches to ignore case; that is,
462 uppercase and lowercase are considered identical.
463 Also, text which is overstruck or underlined can be searched for.
464 This option is ignored if any uppercase letters
465 appear in the search pattern.
467 Specifies a line on the screen where "target" lines
468 are to be positioned.
469 Target lines are the object of text searches,
470 tag searches, jumps to a line number,
471 jumps to a file percentage, and jumps to a marked position.
472 The screen line is specified by a number: the top line on the screen
473 is 1, the next is 2, and so on.
474 The number may be negative to specify a line relative to the bottom
475 of the screen: the bottom line on the screen is -1, the second
476 to the bottom is -2, and so on.
477 If the -j option is used, searches begin at the line immediately
478 after the target line.
479 For example, if "-j4" is used, the target line is the
480 fourth line on the screen, so searches begin at the fifth line
485 to open and interpret the named file as a
488 Multiple -k options may be specified.
489 If a file called .less exists in the user's home directory, this
490 file is also used as a
496 to prompt verbosely (like \fImore\fP),
497 with the percent into the file.
500 prompts with a colon.
504 to prompt even more verbosely than
507 Suppresses line numbers.
508 The default (to use line numbers) may cause
510 to run more slowly in some cases, especially with a very large input file.
511 Suppressing line numbers with the -n flag will avoid this problem.
512 Using line numbers means: the line number will be displayed in the verbose
513 prompt and in the = command,
514 and the v command will pass the current line number to the editor
515 (see also the discussion of LESSEDIT in PROMPTS below).
517 Causes a line number to be displayed at the beginning of
518 each line in the display.
522 to copy its input to the named file as it is being viewed.
523 This applies only when the input file is a pipe,
524 not an ordinary file.
525 If the file already exists,
527 will ask for confirmation before overwriting it.
529 The -O option is like -o, but it will overwrite an existing
530 file without asking for confirmation.
532 If no log file has been specified,
533 the -o and -O options can be used from within
535 to specify a log file.
536 Without a file name, they will simply report the name of the log file.
537 The "s" command is equivalent to specifying -o from within
540 The -p option on the command line is equivalent to
541 specifying +/\fIpattern\fP;
544 to start at the first occurence of \fIpattern\fP in the file.
546 Provides a way to tailor the three prompt
547 styles to your own preference.
548 This option would normally be put in the LESS environment
549 variable, rather than being typed in with each
552 Such an option must either be the last option in the LESS variable,
553 or be terminated by a dollar sign.
554 -P followed by a string changes the default (short) prompt to that string.
555 -Pm changes the medium (-m) prompt to the string, and
556 -PM changes the long (-M) prompt.
557 Also, -P= changes the message printed by the = command to the given string.
558 All prompt strings consist of a sequence of
559 letters and special escape sequences.
560 See the section on PROMPTS for more details.
562 Causes moderately "quiet" operation:
563 the terminal bell is not rung
564 if an attempt is made to scroll past the end of the file
565 or before the beginning of the file.
566 If the terminal has a "visual bell", it is used instead.
567 The bell will be rung on certain other errors,
568 such as typing an invalid character.
569 The default is to ring the terminal bell in all such cases.
571 Causes totally "quiet" operation:
572 the terminal bell is never rung.
574 Causes "raw" control characters to be displayed.
575 The default is to display control characters using the caret notation;
576 for example, a control-A (octal 001) is displayed as "^A".
577 Warning: when the -r flag is used,
579 cannot keep track of the actual appearance of the screen
580 (since this depends on how the screen responds to
581 each type of control character).
582 Thus, various display problems may result,
583 such as long lines being split in the wrong place.
585 Causes consecutive blank lines to be squeezed into a single blank line.
586 This is useful when viewing
590 Causes lines longer than the screen width to be
591 chopped rather than folded.
592 That is, the remainder of a long line is simply discarded.
593 The default is to fold long lines; that is, display the remainder
596 The -t option, followed immediately by a TAG,
597 will edit the file containing that tag.
598 For this to work, there must be a file called "tags" in the
599 current directory, which was previously built by the
602 This option may also be specified from within
604 (using the \- command) as a way of examining a new file.
605 The command ":t" is equivalent to specifying -t from within
608 Specifies a tags file to be used instead of "tags".
610 Causes backspaces and carriage returns to be treated as printable characters;
611 that is, they are sent to the terminal when they appear in the input.
613 Causes backspaces and carriage returns to be treated as control characters;
614 that is, they are handled as specified by the -r option.
616 By default, if neither -u nor -U is given,
617 backspaces which appear adjacent to an underscore character
618 are treated specially:
619 the underlined text is displayed
620 using the terminal's hardware underlining capability.
621 Also, backspaces which appear between two identical characters
622 are treated specially:
623 the overstruck text is printed
624 using the terminal's hardware boldface capability.
625 Other backspaces are deleted, along with the preceding character.
626 Carriage returns immediately followed by a newline are deleted.
627 Other carriage returns are handled as specified by the -r option.
629 Causes blank lines to be used to represent lines
630 past the end of the file.
632 a tilde character is used.
634 Sets tab stops every \fIn\fP positions.
635 The default for \fIn\fP is 8.
637 Specifies a maximum number of lines to scroll forward.
638 If it is necessary to scroll forward more than \fIn\fP lines,
639 the screen is repainted instead.
640 The -c or -C option may be used to repaint from the top of
641 the screen if desired.
642 By default, any forward movement causes scrolling.
644 Changes the default scrolling window size to \fIn\fP lines.
645 The default is one screenful.
646 The z and w commands can also be used to change the window size.
647 The "z" may be omitted, as in "-\fIn\fP" for compatibility with
650 If a command line option begins with \fB+\fP,
651 the remainder of that option is taken to be an initial command to
653 For example, +G tells
655 to start at the end of the file rather than the beginning,
656 and +/xyz tells it to start at the first occurrence of "xyz" in the file.
657 As a special case, +<number> acts like +<number>g;
658 that is, it starts the display at the specified line number
659 (however, see the caveat under the "g" command above).
660 If the option starts with ++, the initial command applies to
661 every file being viewed, not just the first one.
662 The + command described previously
663 may also be used to set (or change) an initial command for every file.
666 You may define your own
668 commands by using the program
671 to create a file called ".less" in your home directory.
672 This file specifies a set of command keys and an action
673 associated with each key.
676 manual page for more details.
678 .SH "NATIONAL CHARACTER SETS"
679 There are three types of characters in the input file:
680 .IP "normal characters"
681 can be displayed directly to the screen.
682 .IP "control characters"
683 should not be displayed directly, but are expected to be found
684 in ordinary text files (such as backspace and tab).
685 .IP "binary characters"
686 cannot be displayed directly and are not expected to be found
691 uses the ASCII character set.
692 In the ASCII character set, characters
693 with values between 128 and 255 are treated as binary.
694 The LESSCHARSET environment variable may be used to select
695 another character set.
696 If it is set to the value "latin1",
697 the ISO 8859/1 character set is assumed.
698 Latin-1 is the same as ASCII, except characters between 128 and 255 are
699 treated as normal characters.
700 The only valid values for LESSCHARSET currently are "ascii" and "latin1".
702 In special cases, it may be desired to tailor
704 to use a character set other than the ones definable by LESSCHARSET.
705 In this case, the environment variable LESSCHARDEF can be used
706 to define a character set.
707 It should be set to a string where each character in the string represents
708 one character in the character set.
709 The character "." is used for a normal character, "c" for control,
711 A decimal number may be used for repetition.
712 For example, "bccc4b." would mean character 0 is binary,
713 1, 2 and 3 are control, 4, 5, 6 and 7 are binary, and 8 is normal.
714 All characters after the last are taken to be the same as the last,
715 so characters 9 through 255 would be normal.
716 (This is an example, and does not necessarily
717 represent any real character set.)
719 Setting LESSCHARDEF to "8bcccbcc18b95.b" is the same as setting
720 LESSCHARSET to "ascii".
721 Setting LESSCHARDEF to "8bcccbcc18b95.33b." is the same as setting
722 LESSCHARSET to "latin1".
724 Control and binary characters are displayed in blinking mode.
725 Each such character is displayed in caret notation if possible
726 (e.g. ^A for control-A). Caret notation is used only if
727 inverting the 0100 bit results in a normal printable character.
728 Otherwise, the character is displayed as an octal number preceded
730 This octal format can be changed by
731 setting the LESSBINFMT environment variable
732 to a printf-style format string; the default is '\\%o'.
733 The blinking mode display of control and binary characters can
734 be changed or disabled by preceding the LESSBINFMT format
735 string with a "*" and one character to select the mode:
736 "*k" is blinking, "*d" is bold, "*u" is underlined,
737 and "*n" is normal (no special display attribute).
738 For example, if LESSBINFMT is "*u[%x]", binary characters
739 are displayed in underlined hexadecimal surrounded by brackets.
742 The -P option allows you to tailor the prompt to your preference.
743 The string given to the -P option replaces the specified prompt string.
744 Certain characters in the string are interpreted specially.
745 The prompt mechanism is rather complicated to provide flexibility,
746 but the ordinary user need not understand the details of constructing
747 personalized prompt strings.
749 A percent sign followed by a single character is expanded
750 according to what the following character is:
752 Replaced by the byte offset into the current input file.
753 The b is followed by a single character (shown as \fIX\fP above)
754 which specifies the line whose byte offset is to be used.
755 If the character is a "t", the byte offset of the top line in the
757 an "m" means use the middle line,
758 a "b" means use the bottom line,
759 a "B" means use the line just after the bottom line,
760 and a "j" means use the "target" line, as specified by the -j option.
762 Replaced by the size of the current input file.
764 Replaced by the name of the editor (from the EDITOR environment variable).
765 See the discussion of the LESSEDIT feature below.
767 Replaced by the name of the current input file.
769 Replaced by the index of the current file in the list of
772 Replaced by the line number of a line in the input file.
773 The line to be used is determined by the \fIX\fP, as with the %b option.
775 Replaced by the line number of the last line in the input file.
777 Replaced by the total number of input files.
779 Replaced by the percent into the current input file.
780 The line used is determined by the \fIX\fP as with the %b option.
784 Causes any trailing spaces to be removed.
785 Usually used at the end of the string, but may appear anywhere.
787 Replaced by the name of the next input file in the list.
789 If any item is unknown (for example, the file size if input
790 is a pipe), a question mark is printed instead.
792 The format of the prompt string can be changed
793 depending on certain conditions.
794 A question mark followed by a single character acts like an "IF":
795 depending on the following character, a condition is evaluated.
796 If the condition is true, any characters following the question mark
797 and condition character, up to a period, are included in the prompt.
798 If the condition is false, such characters are not included.
799 A colon appearing between the question mark and the
800 period can be used to establish an "ELSE": any characters between
801 the colon and the period are included in the string if and only if
802 the IF condition is false.
803 Condition characters (which follow a question mark) may be:
805 True if any characters have been included in the prompt so far.
807 True if the byte offset of the specified line is known.
809 True if the size of current input file is known.
811 True if at end-of-file.
813 True if there is an input filename
814 (that is, if input is not a pipe).
816 True if the line number of the specified line is known.
818 True if the line number of the last line in the file is known.
820 True if there is more than one input file.
822 True if this is the first prompt in a new input file.
824 True if the percent into the current input file
825 of the specified line is known.
829 True if there is a next input file
830 (that is, if the current input file is not the last one).
832 Any characters other than the special ones
833 (question mark, colon, period, percent, and backslash)
834 become literally part of the prompt.
835 Any of the special characters may be included in the prompt literally
836 by preceding it with a backslash.
842 This prompt prints the filename, if known;
843 otherwise the string "Standard input".
845 ?f%f .?ltLine %lt:?pt%pt\\%:?btByte %bt:-...
847 This prompt would print the filename, if known.
848 The filename is followed by the line number, if known,
849 otherwise the percent if known, otherwise the byte offset if known.
850 Otherwise, a dash is printed.
851 Notice how each question mark has a matching period,
852 and how the % after the %pt
853 is included literally by escaping it with a backslash.
855 ?n?f%f\ .?m(file\ %i\ of\ %m)\ ..?e(END)\ ?x-\ Next\\:\ %x..%t
857 This prints the filename if this is the first prompt in a file,
858 followed by the "file N of N" message if there is more
860 Then, if we are at end-of-file, the string "(END)" is printed
861 followed by the name of the next file, if there is one.
862 Finally, any trailing spaces are truncated.
863 This is the default prompt.
864 For reference, here are the defaults for
865 the other two prompts (-m and -M respectively).
866 Each is broken into two lines here for readability only.
869 ?n?f%f\ .?m(file\ %i\ of\ %m)\ ..?e(END)\ ?x-\ Next\\:\ %x.:
870 ?pB%pB\\%:byte\ %bB?s/%s...%t
872 ?f%f\ .?n?m(file\ %i\ of\ %m)\ ..?ltline\ %lt?L/%L.\ :byte\ %bB?s/%s.\ .
873 ?e(END)\ ?x-\ Next\\:\ %x.:?pB%pB\\%..%t
876 And here is the default message produced by the = command:
879 ?f%f\ .?m(file\ %i\ of\ %m)\ .?ltline\ %lt?L/%L.\ .
880 byte\ %bB?s/%s.\ ?e(END)\ :?pB%pB\\%..%t
883 The prompt expansion features are also used for another purpose:
884 if an environment variable LESSEDIT is defined, it is used
885 as the command to be executed when the v command is invoked.
886 The LESSEDIT string is expanded in the same way as the prompt strings.
887 The default value for LESSEDIT is:
893 Note that this expands to the editor name, followed by a + and the
894 line number, followed by the file name.
895 If your editor does not accept the "+linenumber" syntax, or has other
896 differences in invocation syntax, the LESSEDIT variable can be
897 changed to modify this default.
899 .SH "ENVIRONMENT VARIABLES"
901 Sets the number of columns on the screen.
902 Takes precedence over the number of columns specified by the TERM variable.
904 The name of the editor (used for the v command).
906 Name of the user's home directory (used to find a .less file).
908 Flags which are passed to
912 Format for displaying non-printable, non-control characters.
914 Defines a character set.
916 Selects a predefined character set.
918 Editor prototype string (used for the v command).
919 See discussion under PROMPTS.
921 Name of the help file.
923 Sets the number of lines on the screen.
924 Takes precedence over the number of lines specified by the TERM variable.
926 The shell used to execute the ! command, as well as to expand filenames.
928 The type of terminal on which
936 The = command and prompts (unless changed by -P)
937 report the line number of the line at the top of the screen,
938 but the byte and percent of the line at the bottom of the screen.
940 If the :e command is used to name more than one file,
941 and one of the named files has been viewed previously,
942 the new files may be entered into the list in an unexpected order.
944 The handling of national character sets is nonstandard as well as
945 insufficient for multibyte characters.
946 It will probably change in a later release.