"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "less.man" between
less-580.tar.gz and less-581.tar.gz

About: less is a file pager (a program that displays text files similar to "more" or "pg"). Beta version.

less.man  (less-580):less.man  (less-581)
skipping to change at line 152 skipping to change at line 152
Scroll horizontally right to show the end of the Scroll horizontally right to show the end of the
longest dis‐ longest dis‐
played line. played line.
ESC‐{ or ^LEFTARROW ESC‐{ or ^LEFTARROW
Scroll horizontally left back to the first column. Scroll horizontally left back to the first column.
r or ^R or ^L r or ^R or ^L
Repaint the screen. Repaint the screen.
R Repaint the screen, discarding any buffered in- R Repaint the screen, discarding any buffered in-
put. Useful if put. That is,
the file is changing while it is being viewed. reload the current file. Useful if the file is
changing while
F Scroll forward, and keep trying to read when the it is being viewed.
end of file is
reached. Normally this command would be used F Scroll forward, and keep trying to read when the
when already at end of file is
the end of the file. It is a way to monitor the reached. Normally this command would be used when
tail of a file already at
which is growing while it is being viewed. the end of the file. It is a way to monitor the
(The behavior is tail of a file
similar to the "tail ‐f" command.) To stop wait- which is growing while it is being viewed. (The
ing for more behavior is
data, enter the interrupt character (usually ^C). similar to the "tail ‐f" command.) To stop
On some sys‐ waiting for more
data, enter the interrupt character (usually ^C).
On some sys‐
tems you can also use ^X. tems you can also use ^X.
ESC‐F Like F, but as soon as a line is found which ESC‐F Like F, but as soon as a line is found which
matches the last matches the last
search pattern, the terminal bell is rung and for- search pattern, the terminal bell is rung and for-
ward scrolling ward scrolling
stops. stops.
g or < or ESC‐< g or < or ESC‐<
Go to line N in the file, default 1 (beginning of Go to line N in the file, default 1 (beginning of
file). (Warn‐ file). (Warn‐
ing: this may be slow if N is large.) ing: this may be slow if N is large.)
G or > or ESC‐> G or > or ESC‐>
Go to line N in the file, default the end of the Go to line N in the file, default the end of the
file. (Warn‐ file. (Warn‐
ing: this may be slow if N is large, or if N is ing: this may be slow if N is large, or if N is
not specified not specified
and standard input, rather than a file, is being and standard input, rather than a file, is being
read.) read.)
ESC‐G Same as G, except if no number N is specified and ESC‐G Same as G, except if no number N is specified and
the input is the input is
standard input, goes to the last line which standard input, goes to the last line which
is currently is currently
buffered. buffered.
p or % Go to a position N percent into the file. N should p or % Go to a position N percent into the file. N should
be between 0 be between 0
and 100, and may contain a decimal point. and 100, and may contain a decimal point.
P Go to the line containing byte offset N in the P Go to the line containing byte offset N in the
file. file.
{ If a left curly bracket appears in the top line { If a left curly bracket appears in the top line
displayed on the displayed on the
screen, the { command will go to the match- screen, the { command will go to the matching
ing right curly right curly
bracket. The matching right curly bracket is posi- bracket. The matching right curly bracket is po-
tioned on the sitioned on the
bottom line of the screen. If there is more than bottom line of the screen. If there is more than
one left curly one left curly
bracket on the top line, a number N may be used to bracket on the top line, a number N may be used
specify the to specify the
N‐th bracket on the line. N‐th bracket on the line.
} If a right curly bracket appears in the bottom line } If a right curly bracket appears in the bottom line
displayed on displayed on
the screen, the } command will go to the matching the screen, the } command will go to the match-
left curly ing left curly
bracket. The matching left curly bracket is po- bracket. The matching left curly bracket is posi-
sitioned on the tioned on the
top line of the screen. If there is more than one top line of the screen. If there is more than
right curly one right curly
bracket on the top line, a number N may be used bracket on the top line, a number N may be used to
to specify the specify the
N‐th bracket on the line. N‐th bracket on the line.
( Like {, but applies to parentheses rather than ( Like {, but applies to parentheses rather than
curly brackets. curly brackets.
) Like }, but applies to parentheses rather than ) Like }, but applies to parentheses rather than
curly brackets. curly brackets.
[ Like {, but applies to square brackets rather than [ Like {, but applies to square brackets rather than
curly brack‐
ets.
] Like }, but applies to square brackets rather than
curly brack‐ curly brack‐
ets. ets.
ESC‐^F Followed by two characters, acts like {, but uses ] Like }, but applies to square brackets rather than
the two char‐ curly brack‐
acters as open and close brackets, respectively. ets.
For example,
"ESC ^F < >" could be used to go forward to the >
which matches
the < in the top displayed line.
ESC‐^B Followed by two characters, acts like }, but uses ESC‐^F Followed by two characters, acts like {, but uses
the two char‐ the two char‐
acters as open and close brackets, respectively. acters as open and close brackets, respectively.
For example, For example,
"ESC ^B < >" could be used to go backward to the < "ESC ^F < >" could be used to go forward to the >
which matches
the < in the top displayed line.
ESC‐^B Followed by two characters, acts like }, but uses
the two char‐
acters as open and close brackets, respectively.
For example,
"ESC ^B < >" could be used to go backward to the <
which matches which matches
the > in the bottom displayed line. the > in the bottom displayed line.
m Followed by any lowercase or uppercase letter, m Followed by any lowercase or uppercase letter,
marks the first marks the first
displayed line with that letter. If the status displayed line with that letter. If the status
column is en‐ column is en‐
abled via the ‐J option, the status column shows abled via the ‐J option, the status column
the marked shows the marked
line. line.
M Acts like m, except the last displayed line is M Acts like m, except the last displayed line is
marked rather marked rather
than the first displayed line. than the first displayed line.
’ (Single quote.) Followed by any lowercase or up- ’ (Single quote.) Followed by any lowercase or up-
percase letter, percase letter,
returns to the position which was previously returns to the position which was previously
marked with that marked with that
letter. Followed by another single quote, returns letter. Followed by another single quote, returns
to the posi‐ to the posi‐
tion at which the last "large" movement command tion at which the last "large" movement command
was executed. was executed.
Followed by a ^ or $, jumps to the beginning or end Followed by a ^ or $, jumps to the beginning or
of the file end of the file
respectively. Marks are preserved when a new file respectively. Marks are preserved when a new file
is examined, is examined,
so the ’ command can be used to switch between in- so the ’ command can be used to switch between in-
put files. put files.
^X^X Same as single quote. ^X^X Same as single quote.
ESC‐m Followed by any lowercase or uppercase letter, ESC‐m Followed by any lowercase or uppercase letter,
clears the mark clears the mark
identified by that letter. identified by that letter.
/pattern /pattern
Search forward in the file for the N‐th line con- Search forward in the file for the N‐th line con-
taining the pat‐ taining the pat‐
tern. N defaults to 1. The pattern is a regular tern. N defaults to 1. The pattern is a regular
expression, as expression, as
recognized by the regular expression library recognized by the regular expression library sup-
supplied by your plied by your
system. The search starts at the first line dis- system. The search starts at the first line dis-
played (but see played (but see
the ‐a and ‐j options, which change this). the ‐a and ‐j options, which change this).
Certain characters are special if entered at the Certain characters are special if entered at the
beginning of beginning of
the pattern; they modify the type of search rather the pattern; they modify the type of search
than become rather than become
part of the pattern: part of the pattern:
^N or ! ^N or !
Search for lines which do NOT match the pat- Search for lines which do NOT match the pat-
tern. tern.
^E or * ^E or *
Search multiple files. That is, if the Search multiple files. That is, if the
search reaches search reaches
the END of the current file without finding the END of the current file without finding
a match, the a match, the
search continues in the next file in the search continues in the next file in the
command line command line
list. list.
^F or @ ^F or @
Begin the search at the first line of the Begin the search at the first line of the
FIRST file in FIRST file in
the command line list, regardless of what the command line list, regardless of what
is currently is currently
displayed on the screen or the settings of displayed on the screen or the settings of
the ‐a or ‐j the ‐a or ‐j
options. options.
^K Highlight any text which matches the pat- ^K Highlight any text which matches the pattern
tern on the cur‐ on the cur‐
rent screen, but don’t move to the first rent screen, but don’t move to the first
match (KEEP cur‐ match (KEEP cur‐
rent position). rent position).
^R Don’t interpret regular expression ^R Don’t interpret regular expression
metacharacters; that metacharacters; that
is, do a simple textual comparison. is, do a simple textual comparison.
^W WRAP around the current file. That is, if ^W WRAP around the current file. That is,
the search if the search
reaches the end of the current file reaches the end of the current file with-
without finding a out finding a
match, the search continues from the first match, the search continues from the
line of the first line of the
current file up to the line where it start- current file up to the line where it start-
ed. ed.
?pattern ?pattern
Search backward in the file for the N‐th line Search backward in the file for the N‐th line
containing the containing the
pattern. The search starts at the last line dis- pattern. The search starts at the last line dis-
played (but see played (but see
the ‐a and ‐j options, which change this). the ‐a and ‐j options, which change this).
Certain characters are special as in the / command: Certain characters are special as in the / command:
^N or ! ^N or !
Search for lines which do NOT match the pat- Search for lines which do NOT match the pat-
tern. tern.
^E or * ^E or *
Search multiple files. That is, if the Search multiple files. That is, if the
search reaches search reaches
the beginning of the current file with- the beginning of the current file
out finding a without finding a
match, the search continues in the previ- match, the search continues in the previous
ous file in the file in the
command line list. command line list.
^F or @ ^F or @
Begin the search at the last line of the Begin the search at the last line of the
last file in the last file in the
command line list, regardless of what is command line list, regardless of what is
currently dis‐ currently dis‐
played on the screen or the settings of the played on the screen or the settings of the
‐a or ‐j op‐ ‐a or ‐j op‐
tions. tions.
^K As in forward searches. ^K As in forward searches.
^R As in forward searches. ^R As in forward searches.
^W WRAP around the current file. That is, ^W WRAP around the current file. That is, if
if the search the search
reaches the beginning of the current file reaches the beginning of the current file
without finding without finding
a match, the search continues from the a match, the search continues from the last
last line of the line of the
current file up to the line where it start- current file up to the line where it start-
ed. ed.
ESC‐/pattern ESC‐/pattern
Same as "/*". Same as "/*".
ESC‐?pattern ESC‐?pattern
Same as "?*". Same as "?*".
n Repeat previous search, for N‐th line containing n Repeat previous search, for N‐th line containing
the last pat‐ the last pat‐
tern. If the previous search was modified by ^N, tern. If the previous search was modified by ^N,
the search is the search is
made for the N‐th line NOT containing the pattern. made for the N‐th line NOT containing the pattern.
If the pre‐ If the pre‐
vious search was modified by ^E, the search vious search was modified by ^E, the search con-
continues in the tinues in the
next (or previous) file if not satisfied in the next (or previous) file if not satisfied in the
current file. current file.
If the previous search was modified by ^R, the If the previous search was modified by ^R, the
search is done search is done
without using regular expressions. There is no without using regular expressions. There is no
effect if the effect if the
previous search was modified by ^F or ^K. previous search was modified by ^F or ^K.
N Repeat previous search, but in the reverse direc- N Repeat previous search, but in the reverse direc-
tion. tion.
ESC‐n Repeat previous search, but crossing file bound- ESC‐n Repeat previous search, but crossing file bound-
aries. The ef‐ aries. The ef‐
fect is as if the previous search were modified by fect is as if the previous search were modified by
*. *.
ESC‐N Repeat previous search, but in the reverse direc- ESC‐N Repeat previous search, but in the reverse direc-
tion and cross‐ tion and cross‐
ing file boundaries. ing file boundaries.
ESC‐u Undo search highlighting. Turn off highlight- ESC‐u Undo search highlighting. Turn off highlighting
ing of strings of strings
matching the current search pattern. If highlight- matching the current search pattern. If highlight-
ing is already ing is already
off because of a previous ESC‐u command, turn off because of a previous ESC‐u command, turn high-
highlighting back lighting back
on. Any search command will also turn highlight- on. Any search command will also turn high-
ing back on. lighting back on.
(Highlighting can also be disabled by toggling the (Highlighting can also be disabled by toggling the
‐G option; in ‐G option; in
that case search commands do not turn highlighting that case search commands do not turn highlighting
back on.) back on.)
ESC‐U Like ESC‐u but also clears the saved search pat- ESC‐U Like ESC‐u but also clears the saved search
tern. If the pattern. If the
status column is enabled via the ‐J option, status column is enabled via the ‐J option, this
this clears all clears all
search matches marked in the status column. search matches marked in the status column.
&pattern &pattern
Display only lines which match the pattern; lines Display only lines which match the pattern; lines
which do not which do not
match the pattern are not displayed. If pattern match the pattern are not displayed. If pattern
is empty (if is empty (if
you type & immediately followed by ENTER), any you type & immediately followed by ENTER), any
filtering is filtering is
turned off, and all lines are displayed. While turned off, and all lines are displayed. While
filtering is in filtering is in
effect, an ampersand is displayed at the be- effect, an ampersand is displayed at the be-
ginning of the ginning of the
prompt, as a reminder that some lines in the file prompt, as a reminder that some lines in the file
may be hidden. may be hidden.
Multiple & commands may be entered, in which case Multiple & commands may be entered, in which
only lines case only lines
which match all of the patterns will be displayed. which match all of the patterns will be displayed.
Certain characters are special as in the / command: Certain characters are special as in the / command:
^N or ! ^N or !
Display only lines which do NOT match the Display only lines which do NOT match the
pattern. pattern.
^R Don’t interpret regular expression ^R Don’t interpret regular expression
metacharacters; that metacharacters; that
is, do a simple textual comparison. is, do a simple textual comparison.
:e [filename] :e [filename]
Examine a new file. If the filename is missing, Examine a new file. If the filename is missing,
the "current" the "current"
file (see the :n and :p commands below) from the file (see the :n and :p commands below) from the
list of files list of files
in the command line is re‐examined. A percent sign in the command line is re‐examined. A percent
(%) in the sign (%) in the
filename is replaced by the name of the current filename is replaced by the name of the current
file. A pound file. A pound
sign (#) is replaced by the name of the previ- sign (#) is replaced by the name of the previ-
ously examined ously examined
file. However, two consecutive percent signs file. However, two consecutive percent signs are
are simply re‐ simply re‐
placed with a single percent sign. This allows you placed with a single percent sign. This allows
to enter a you to enter a
filename that contains a percent sign in the filename that contains a percent sign in the name.
name. Similarly, Similarly,
two consecutive pound signs are replaced with a two consecutive pound signs are replaced with a
single pound single pound
sign. The filename is inserted into the command sign. The filename is inserted into the command
line list of line list of
files so that it can be seen by subsequent :n and files so that it can be seen by subsequent :n and
:p commands. :p commands.
If the filename consists of several files, they are If the filename consists of several files, they are
all inserted all inserted
into the list of files and the first one is exam- into the list of files and the first one is ex-
ined. If the amined. If the
filename contains one or more spaces, the entire filename contains one or more spaces, the entire
filename should filename should
be enclosed in double quotes (also see the ‐" op- be enclosed in double quotes (also see the ‐" op-
tion). tion).
^X^V or E ^X^V or E
Same as :e. Warning: some systems use ^V as a spe- Same as :e. Warning: some systems use ^V as a
cial literal‐ special literal‐
ization character. On such systems, you may not ization character. On such systems, you may not be
be able to use able to use
^V. ^V.
:n Examine the next file (from the list of files given :n Examine the next file (from the list of files giv-
in the com‐ en in the com‐
mand line). If a number N is specified, the N‐th mand line). If a number N is specified, the N‐th
next file is next file is
examined. examined.
:p Examine the previous file in the command line list. :p Examine the previous file in the command line list.
If a number If a number
N is specified, the N‐th previous file is examined. N is specified, the N‐th previous file is examined.
:x Examine the first file in the command line list. :x Examine the first file in the command line list.
If a number N If a number N
is specified, the N‐th file in the list is exam- is specified, the N‐th file in the list is exam-
ined. ined.
:d Remove the current file from the list of files. :d Remove the current file from the list of files.
t Go to the next tag, if there were more than one t Go to the next tag, if there were more than one
matches for the matches for the
current tag. See the ‐t option for more details current tag. See the ‐t option for more details
about tags. about tags.
T Go to the previous tag, if there were more than T Go to the previous tag, if there were more than one
one matches for matches for
the current tag. the current tag.
= or ^G or :f = or ^G or :f
Prints some information about the file being Prints some information about the file being
viewed, including viewed, including
its name and the line number and byte offset of its name and the line number and byte offset of the
the bottom line bottom line
being displayed. If possible, it also prints the being displayed. If possible, it also prints the
length of the length of the
file, the number of lines in the file and the file, the number of lines in the file and the
percent of the percent of the
file above the last displayed line. file above the last displayed line.
‐ Followed by one of the command line option letters ‐ Followed by one of the command line option letters
(see OPTIONS (see OPTIONS
below), this will change the setting of that op- below), this will change the setting of that option
tion and print a and print a
message describing the new setting. If a ^P (CON- message describing the new setting. If a ^P (CON-
TROL‐P) is en‐ TROL‐P) is en‐
tered immediately after the dash, the setting of tered immediately after the dash, the setting of
the option is the option is
changed but no message is printed. If the option changed but no message is printed. If the option
letter has a letter has a
numeric value (such as ‐b or ‐h), or a string val- numeric value (such as ‐b or ‐h), or a string value
ue (such as ‐P (such as ‐P
or ‐t), a new value may be entered after the option or ‐t), a new value may be entered after the op-
letter. If tion letter. If
no new value is entered, a message describing the no new value is entered, a message describing the
current set‐ current set‐
ting is printed and nothing is changed. ting is printed and nothing is changed.
‐‐ Like the ‐ command, but takes a long option name ‐‐ Like the ‐ command, but takes a long option name
(see OPTIONS (see OPTIONS
below) rather than a single option letter. You below) rather than a single option letter. You
must press ENTER must press ENTER
or RETURN after typing the option name. A ^P imme- or RETURN after typing the option name. A ^P im-
diately after mediately after
the second dash suppresses printing of a message the second dash suppresses printing of a message
describing the describing the
new setting, as in the ‐ command. new setting, as in the ‐ command.
‐+ Followed by one of the command line option letters ‐+ Followed by one of the command line option letters
this will re‐ this will re‐
set the option to its default setting and print set the option to its default setting and print a
a message de‐ message de‐
scribing the new setting. (The "‐+[4mX[24m" com- scribing the new setting. (The "‐+[4mX[24m"
mand does the same command does the same
thing as "‐+[4mX[24m" on the command line.) thing as "‐+[4mX[24m" on the command line.) This
This does not work for does not work for
string‐valued options. string‐valued options.
‐‐+ Like the ‐+ command, but takes a long option name ‐‐+ Like the ‐+ command, but takes a long option name
rather than a rather than a
single option letter. single option letter.
‐! Followed by one of the command line option let- ‐! Followed by one of the command line option let-
ters, this will ters, this will
reset the option to the "opposite" of its default reset the option to the "opposite" of its de-
setting and fault setting and
print a message describing the new setting. This print a message describing the new setting. This
does not work does not work
for numeric or string‐valued options. for numeric or string‐valued options.
‐‐! Like the ‐! command, but takes a long option name ‐‐! Like the ‐! command, but takes a long option name
rather than a rather than a
single option letter. single option letter.
_ (Underscore.) Followed by one of the command _ (Underscore.) Followed by one of the command line
line option let‐ option let‐
ters, this will print a message describing the ters, this will print a message describing the
current setting current setting
of that option. The setting of the option is not of that option. The setting of the option is not
changed. changed.
__ (Double underscore.) Like the _ (underscore) com- __ (Double underscore.) Like the _ (underscore) com-
mand, but takes mand, but takes
a long option name rather than a single option let- a long option name rather than a single option let-
ter. You must ter. You must
press ENTER or RETURN after typing the option name. press ENTER or RETURN after typing the option name.
+cmd Causes the specified cmd to be executed each time +cmd Causes the specified cmd to be executed each time a
a new file is new file is
examined. For example, +G causes [4mless[24m to examined. For example, +G causes [4mless[24m to
initially display each initially display each
file starting at the end rather than the beginning. file starting at the end rather than the beginning.
V Prints the version number of [4mless[24m being run. V Prints the version number of [4mless[24m being run.
q or Q or :q or :Q or ZZ q or Q or :q or :Q or ZZ
Exits [4mless[24m. Exits [4mless[24m.
The following four commands may or may not be valid, de- The following four commands may or may not be valid, de-
pending on your pending on your
particular installation. particular installation.
v Invokes an editor to edit the current file being v Invokes an editor to edit the current file being
viewed. The viewed. The
editor is taken from the environment variable VIS- editor is taken from the environment variable VIS-
UAL if defined, UAL if defined,
or EDITOR if VISUAL is not defined, or defaults to or EDITOR if VISUAL is not defined, or defaults to
"vi" if nei‐ "vi" if nei‐
ther VISUAL nor EDITOR is defined. See also the ther VISUAL nor EDITOR is defined. See also the
discussion of discussion of
LESSEDIT under the section on PROMPTS below. LESSEDIT under the section on PROMPTS below.
! shell‐command ! shell‐command
Invokes a shell to run the shell‐command given. A Invokes a shell to run the shell‐command given. A
percent sign percent sign
(%) in the command is replaced by the name of the (%) in the command is replaced by the name of the
current file. current file.
A pound sign (#) is replaced by the name of the A pound sign (#) is replaced by the name of the
previously exam‐ previously exam‐
ined file. "!!" repeats the last shell command. ined file. "!!" repeats the last shell command.
"!" with no "!" with no
shell command simply invokes a shell. On Unix shell command simply invokes a shell. On Unix
systems, the systems, the
shell is taken from the environment variable shell is taken from the environment variable SHELL,
SHELL, or defaults or defaults
to "sh". On MS‐DOS and OS/2 systems, the shell is to "sh". On MS‐DOS and OS/2 systems, the shell
the normal is the normal
command processor. command processor.
| <m> shell‐command | <m> shell‐command
<m> represents any mark letter. Pipes a section <m> represents any mark letter. Pipes a section
of the input of the input
file to the given shell command. The section of file to the given shell command. The section of
the file to be the file to be
piped is between the position marked by the letter piped is between the position marked by the letter
and the cur‐ and the cur‐
rent screen. The entire current screen is includ- rent screen. The entire current screen is includ-
ed, regardless ed, regardless
of whether the marked position is before or af- of whether the marked position is before or after
ter the current the current
screen. <m> may also be ^ or $ to indicate begin- screen. <m> may also be ^ or $ to indicate begin-
ning or end of ning or end of
file respectively. If <m> is . or newline, the file respectively. If <m> is . or newline, the
current screen current screen
is piped. is piped.
s filename s filename
Save the input to a file. This only works if the Save the input to a file. This only works if
input is a the input is a
pipe, not an ordinary file. pipe, not an ordinary file.
[1mOPTIONS[0m [1mOPTIONS[0m
Command line options are described below. Most options Command line options are described below. Most options
may be changed may be changed
while [4mless[24m is running, via the "‐" command. while [4mless[24m is running, via the "‐" command.
Most options may be given in one of two forms: either a Most options may be given in one of two forms: either a
dash followed dash followed
by a single letter, or two dashes followed by a long by a single letter, or two dashes followed by a long op-
option name. A tion name. A
long option name may be abbreviated as long as the abbre- long option name may be abbreviated as long as the abbre-
viation is un‐ viation is un‐
ambiguous. For example, ‐‐quit‐at‐eof may be abbreviat- ambiguous. For example, ‐‐quit‐at‐eof may be abbreviated
ed ‐‐quit, but ‐‐quit, but
not ‐‐qui, since both ‐‐quit‐at‐eof and ‐‐quiet begin with not ‐‐qui, since both ‐‐quit‐at‐eof and ‐‐quiet begin with
‐‐qui. Some ‐‐qui. Some
long option names are in uppercase, such as ‐‐QUIT‐AT‐ long option names are in uppercase, such as ‐‐QUIT‐AT‐EOF,
EOF, as distinct as distinct
from ‐‐quit‐at‐eof. Such option names need only have from ‐‐quit‐at‐eof. Such option names need only have
their first let‐ their first let‐
ter capitalized; the remainder of the name may be in ei- ter capitalized; the remainder of the name may be in ei-
ther case. For ther case. For
example, ‐‐Quit‐at‐eof is equivalent to ‐‐QUIT‐AT‐EOF. example, ‐‐Quit‐at‐eof is equivalent to ‐‐QUIT‐AT‐EOF.
Options are also taken from the environment variable Options are also taken from the environment variable
"LESS". For exam‐ "LESS". For exam‐
ple, to avoid typing "less ‐options ..." each time ple, to avoid typing "less ‐options ..." each time
[4mless[24m is invoked, you [4mless[24m is invoked, you
might tell [4mcsh[24m: might tell [4mcsh[24m:
setenv LESS "‐options" setenv LESS "‐options"
or if you use [4msh[24m: or if you use [4msh[24m:
LESS="‐options"; export LESS LESS="‐options"; export LESS
On MS‐DOS, you don’t need the quotes, but you should re- On MS‐DOS, you don’t need the quotes, but you should re-
place any per‐ place any per‐
cent signs in the options string by double percent signs. cent signs in the options string by double percent signs.
The environment variable is parsed before the command The environment variable is parsed before the command
line, so command line, so command
line options override the LESS environment variable. If line options override the LESS environment variable. If
an option ap‐ an option ap‐
pears in the LESS variable, it can be reset to its default pears in the LESS variable, it can be reset to its default
value on the value on the
command line by beginning the command line option with command line by beginning the command line option with
"‐+". "‐+".
Some options like ‐k or ‐D require a string to follow the Some options like ‐k or ‐D require a string to follow
option let‐ the option let‐
ter. The string for that option is considered to end ter. The string for that option is considered to end
when a dollar when a dollar
sign ($) is found. For example, you can set two ‐D op- sign ($) is found. For example, you can set two ‐D op-
tions on MS‐DOS tions on MS‐DOS
like this: like this:
LESS="Dn9.1$Ds4.1" LESS="Dn9.1$Ds4.1"
If the ‐‐use‐backslash option appears earlier in the If the ‐‐use‐backslash option appears earlier in the op-
options, then a tions, then a
dollar sign or backslash may be included literally in an dollar sign or backslash may be included literally in an
option string option string
by preceding it with a backslash. If the ‐‐use‐backslash by preceding it with a backslash. If the ‐‐use‐backslash
option is not option is not
in effect, then backslashes are not treated specially, and in effect, then backslashes are not treated specially,
there is no and there is no
way to include a dollar sign in the option string. way to include a dollar sign in the option string.
‐? or ‐‐help ‐? or ‐‐help
This option displays a summary of the commands ac- This option displays a summary of the commands ac-
cepted by [4mless[0m cepted by [4mless[0m
(the same as the h command). (Depending on how (the same as the h command). (Depending on how
your shell in‐ your shell in‐
terprets the question mark, it may be necessary terprets the question mark, it may be necessary
to quote the to quote the
question mark, thus: "‐ question mark, thus: "‐
‐a or ‐‐search‐skip‐screen ‐a or ‐‐search‐skip‐screen
By default, forward searches start at the top of By default, forward searches start at the top of
the displayed the displayed
screen and backwards searches start at the bot- screen and backwards searches start at the bottom
tom of the dis‐ of the dis‐
played screen (except for repeated searches invoked played screen (except for repeated searches in-
by the n or voked by the n or
N commands, which start after or before the N commands, which start after or before the "tar-
"target" line re‐ get" line re‐
spectively; see the ‐j option for more about the spectively; see the ‐j option for more about the
target line). target line).
The ‐a option causes forward searches to instead The ‐a option causes forward searches to instead
start at the start at the
bottom of the screen and backward searches to start bottom of the screen and backward searches to
at the top start at the top
of the screen, thus skipping all lines displayed on of the screen, thus skipping all lines displayed on
the screen. the screen.
‐A or ‐‐SEARCH‐SKIP‐SCREEN ‐A or ‐‐SEARCH‐SKIP‐SCREEN
Causes all forward searches (not just non‐repeated Causes all forward searches (not just non‐repeated
searches) to searches) to
start just after the target line, and all backward start just after the target line, and all back-
searches to ward searches to
start just before the target line. Thus, forward start just before the target line. Thus, forward
searches will searches will
skip part of the displayed screen (from the first skip part of the displayed screen (from the first
line up to and line up to and
including the target line). Similarly backwards including the target line). Similarly backwards
searches will searches will
skip the displayed screen from the last line up to skip the displayed screen from the last line up to
and including and including
the target line. This was the default behavior in the target line. This was the default behavior in
less versions less versions
prior to 441. prior to 441.
‐b[4mn[24m or ‐‐buffers=[4mn[0m ‐b[4mn[24m or ‐‐buffers=[4mn[0m
Specifies the amount of buffer space [4mless[24m Specifies the amount of buffer space
will use for each [4mless[24m will use for each
file, in units of kilobytes (1024 bytes). By de- file, in units of kilobytes (1024 bytes). By de-
fault 64 KB of fault 64 KB of
buffer space is used for each file (unless the file buffer space is used for each file (unless the
is a pipe; file is a pipe;
see the ‐B option). The ‐b option specifies see the ‐B option). The ‐b option specifies in-
instead that [4mn[0m stead that [4mn[0m
kilobytes of buffer space should be used for each kilobytes of buffer space should be used for each
file. If [4mn[24m is file. If [4mn[24m is
‐1, buffer space is unlimited; that is, the en- ‐1, buffer space is unlimited; that is, the entire
tire file can be file can be
read into memory. read into memory.
‐B or ‐‐auto‐buffers ‐B or ‐‐auto‐buffers
By default, when data is read from a pipe, buffers By default, when data is read from a pipe, buffers
are allocated are allocated
automatically as needed. If a large amount of data automatically as needed. If a large amount of data
is read from is read from
the pipe, this can cause a large amount of memory the pipe, this can cause a large amount of memo-
to be allo‐ ry to be allo‐
cated. The ‐B option disables this automatic allo- cated. The ‐B option disables this automatic allo-
cation of buf‐ cation of buf‐
fers for pipes, so that only 64 KB (or the amount fers for pipes, so that only 64 KB (or the amount
of space spec‐ of space spec‐
ified by the ‐b option) is used for the pipe. ified by the ‐b option) is used for the pipe.
Warning: use of Warning: use of
‐B can result in erroneous display, since only the ‐B can result in erroneous display, since only the
most recently most recently
viewed part of the piped data is kept in memo- viewed part of the piped data is kept in memory;
ry; any earlier any earlier
data is lost. data is lost.
‐c or ‐‐clear‐screen ‐c or ‐‐clear‐screen
Causes full screen repaints to be painted from Causes full screen repaints to be painted from
the top line the top line
down. By default, full screen repaints are done down. By default, full screen repaints are done
by scrolling by scrolling
from the bottom of the screen. from the bottom of the screen.
‐C or ‐‐CLEAR‐SCREEN ‐C or ‐‐CLEAR‐SCREEN
Same as ‐c, for compatibility with older versions Same as ‐c, for compatibility with older versions
of [4mless[24m. of [4mless[24m.
‐d or ‐‐dumb ‐d or ‐‐dumb
The ‐d option suppresses the error message normally The ‐d option suppresses the error message normally
displayed if displayed if
the terminal is dumb; that is, lacks some impor- the terminal is dumb; that is, lacks some important
tant capability, capability,
such as the ability to clear the screen or scroll such as the ability to clear the screen or scroll
backward. The backward. The
‐d option does not otherwise change the behavior ‐d option does not otherwise change the behavior of
of [4mless[24m on a [4mless[24m on a
dumb terminal. dumb terminal.
‐D[1mx[4m[22mcolor[24m or ‐‐color=[1mx[4m[22mcolor[0m ‐D[1mx[4m[22mcolor[24m or ‐‐color=[1mx[4m[22mcolor[0m
Changes the color of different parts of the dis- Changes the color of different parts of the dis-
played text. [1mx[0m played text. [1mx[0m
is a single character which selects the type of is a single character which selects the type of
text whose color text whose color
is being set: is being set:
B Binary characters. B Binary characters.
C Control characters. C Control characters.
E Errors and informational messages. E Errors and informational messages.
M Mark letters in the status column. M Mark letters in the status column.
skipping to change at line 878 skipping to change at line 880
W The highlight enabled via the ‐w option. W The highlight enabled via the ‐w option.
d Bold text. d Bold text.
k Blinking text. k Blinking text.
s Standout text. s Standout text.
u Underlined text. u Underlined text.
The uppercase letters can be used only when the The uppercase letters can be used only when the
‐‐use‐color op‐ ‐‐use‐color op‐
tion is enabled. When text color is specified by tion is enabled. When text color is specified by
both an upper‐ both an upper‐
case letter and a lowercase letter, the uppercase case letter and a lowercase letter, the uppercase
letter takes letter takes
precedence. For example, error messages are nor- precedence. For example, error messages are nor-
mally displayed mally displayed
as standout text. So if both "s" and "E" are given as standout text. So if both "s" and "E" are given
a color, the a color, the
"E" color applies to error messages, and the "s" "E" color applies to error messages, and the "s"
color applies color applies
to other standout text. The "d" and "u" letters to other standout text. The "d" and "u" letters
refer to bold refer to bold
and underline text formed by overstriking with and underline text formed by overstriking with
backspaces (see backspaces (see
the ‐u option), not to text using ANSI escape se- the ‐u option), not to text using ANSI escape se-
quences with the quences with the
‐R option. ‐R option.
A lowercase letter may be followed by a + to indi- A lowercase letter may be followed by a + to indi-
cate that both cate that both
the normal format change and the specified color the normal format change and the specified color
should both be should both be
used. For example, ‐Dug displays underlined text used. For example, ‐Dug displays underlined text
as green with‐ as green with‐
out underlining; the green color has replaced the out underlining; the green color has replaced the
usual under‐ usual under‐
line formatting. But ‐Du+g displays underlined line formatting. But ‐Du+g displays underlined
text as both text as both
green and in underlined format. green and in underlined format.
[4mcolor[24m is either a 4‐bit color string or an [4mcolor[24m is either a 4‐bit color string or an
8‐bit color string: 8‐bit color string:
A 4‐bit color string is zero, one or two charac- A 4‐bit color string is zero, one or two charac-
ters, where the ters, where the
first character specifies the foreground color first character specifies the foreground color and
and the second the second
specifies the background color as follows: specifies the background color as follows:
b Blue b Blue
c Cyan c Cyan
g Green g Green
k Black k Black
m Magenta m Magenta
r Red r Red
w White w White
y Yellow y Yellow
The corresponding upper‐case letter denotes a The corresponding upper‐case letter denotes a
brighter shade of brighter shade of
the color. For example, ‐DNGk displays line num- the color. For example, ‐DNGk displays line num-
bers as bright bers as bright
green text on a black background, and ‐DEbR dis- green text on a black background, and ‐DEbR dis-
plays error mes‐ plays error mes‐
sages as blue text on a bright red background. If sages as blue text on a bright red background. If
either char‐ either char‐
acter is a "‐" or is omitted, the corresponding acter is a "‐" or is omitted, the corresponding
color is set to color is set to
that of normal text. that of normal text.
An 8‐bit color string is one or two decimal inte- An 8‐bit color string is one or two decimal inte-
gers separated gers separated
by a dot, where the first integer specifies the by a dot, where the first integer specifies the
foreground color foreground color
and the second specifies the background color. and the second specifies the background color.
Each integer is Each integer is
a value between 0 and 255 inclusive which selects a a value between 0 and 255 inclusive which selects
"CSI 38;5" a "CSI 38;5"
color value (see color value (see
https://en.wikipedia.org/wiki/ANSI_es- https://en.wikipedia.org/wiki/ANSI_es-
cape_code#SGR_parameters) cape_code#SGR_parameters)
If either integer is a "‐" or is omitted, the cor- If either integer is a "‐" or is omitted, the cor-
responding col‐ responding col‐
or is set to that of normal text. On MS‐DOS ver- or is set to that of normal text. On MS‐DOS ver-
sions of [4mless[24m, sions of [4mless[24m,
8‐bit color is not supported; instead, decimal val- 8‐bit color is not supported; instead, decimal val-
ues are inter‐ ues are inter‐
preted as 4‐bit CHAR_INFO.Attributes values (see preted as 4‐bit CHAR_INFO.Attributes values (see
https://docs.microsoft.com/en‐us/windows/con- https://docs.microsoft.com/en‐us/windows/con-
sole/char‐info‐str). sole/char‐info‐str).
‐e or ‐‐quit‐at‐eof ‐e or ‐‐quit‐at‐eof
Causes [4mless[24m to automatically exit the Causes [4mless[24m to automatically exit the sec-
second time it reaches ond time it reaches
end‐of‐file. By default, the only way to exit end‐of‐file. By default, the only way to exit
[4mless[24m is via the [4mless[24m is via the
"q" command. "q" command.
‐E or ‐‐QUIT‐AT‐EOF ‐E or ‐‐QUIT‐AT‐EOF
Causes [4mless[24m to automatically exit the first Causes [4mless[24m to automatically exit the first
time it reaches end‐ time it reaches end‐
of‐file. of‐file.
‐f or ‐‐force ‐f or ‐‐force
Forces non‐regular files to be opened. (A non‐reg- Forces non‐regular files to be opened. (A non‐reg-
ular file is a ular file is a
directory or a device special file.) Also sup- directory or a device special file.) Also sup-
presses the warn‐ presses the warn‐
ing message when a binary file is opened. By de- ing message when a binary file is opened. By de-
fault, [4mless[24m will fault, [4mless[24m will
refuse to open non‐regular files. Note that some refuse to open non‐regular files. Note that some
operating sys‐ operating sys‐
tems will not allow directories to be read, even if tems will not allow directories to be read, even if
‐f is set. ‐f is set.
‐F or ‐‐quit‐if‐one‐screen ‐F or ‐‐quit‐if‐one‐screen
Causes [4mless[24m to automatically exit if the en- Causes [4mless[24m to automatically exit if the en-
tire file can be dis‐ tire file can be dis‐
played on the first screen. played on the first screen.
‐g or ‐‐hilite‐search ‐g or ‐‐hilite‐search
Normally, [4mless[24m will highlight ALL strings Normally, [4mless[24m will highlight ALL strings
which match the last which match the last
search command. The ‐g option changes this behav- search command. The ‐g option changes this be-
ior to high‐ havior to high‐
light only the particular string which was light only the particular string which was found
found by the last by the last
search command. This can cause [4mless[24m to run search command. This can cause [4mless[24m to run
somewhat faster than somewhat faster than
the default. the default.
‐G or ‐‐HILITE‐SEARCH ‐G or ‐‐HILITE‐SEARCH
The ‐G option suppresses all highlighting of The ‐G option suppresses all highlighting of
strings found by strings found by
search commands. search commands.
‐h[4mn[24m or ‐‐max‐back‐scroll=[4mn[0m ‐h[4mn[24m or ‐‐max‐back‐scroll=[4mn[0m
Specifies a maximum number of lines to scroll back- Specifies a maximum number of lines to scroll
ward. If it backward. If it
is necessary to scroll backward more than [4mn[24m is necessary to scroll backward more than [4mn[24m
lines, the screen is lines, the screen is
repainted in a forward direction instead. (If the repainted in a forward direction instead. (If the
terminal does terminal does
not have the ability to scroll backward, ‐h0 is im- not have the ability to scroll backward, ‐h0 is im-
plied.) plied.)
‐i or ‐‐ignore‐case ‐i or ‐‐ignore‐case
Causes searches to ignore case; that is, uppercase Causes searches to ignore case; that is, uppercase
and lowercase and lowercase
are considered identical. This option is ignored are considered identical. This option is ignored
if any upper‐ if any upper‐
case letters appear in the search pattern; in oth- case letters appear in the search pattern; in other
er words, if a words, if a
pattern contains uppercase letters, then that pattern contains uppercase letters, then that
search does not search does not
ignore case. ignore case.
‐I or ‐‐IGNORE‐CASE ‐I or ‐‐IGNORE‐CASE
Like ‐i, but searches ignore case even if the Like ‐i, but searches ignore case even if the pat-
pattern contains tern contains
uppercase letters. uppercase letters.
‐j[4mn[24m or ‐‐jump‐target=[4mn[0m ‐j[4mn[24m or ‐‐jump‐target=[4mn[0m
Specifies a line on the screen where the "target" Specifies a line on the screen where the "target"
line is to be line is to be
positioned. The target line is the line speci- positioned. The target line is the line specified
fied by any com‐ by any com‐
mand to search for a pattern, jump to a line num- mand to search for a pattern, jump to a line num-
ber, jump to a ber, jump to a
file percentage or jump to a tag. The screen line file percentage or jump to a tag. The screen line
may be speci‐ may be speci‐
fied by a number: the top line on the screen is 1, fied by a number: the top line on the screen is
the next is 1, the next is
2, and so on. The number may be negative to speci- 2, and so on. The number may be negative to speci-
fy a line rel‐ fy a line rel‐
ative to the bottom of the screen: the bottom line ative to the bottom of the screen: the bottom line
on the screen on the screen
is ‐1, the second to the bottom is ‐2, and so on. is ‐1, the second to the bottom is ‐2, and so on.
Alternately, Alternately,
the screen line may be specified as a fraction of the screen line may be specified as a fraction of
the height of the height of
the screen, starting with a decimal point: .5 is the screen, starting with a decimal point: .5 is in
in the middle the middle
of the screen, .3 is three tenths down from the of the screen, .3 is three tenths down from the
first line, and first line, and
so on. If the line is specified as a fraction, so on. If the line is specified as a fraction, the
the actual line actual line
number is recalculated if the terminal window is number is recalculated if the terminal window
resized, so is resized, so
that the target line remains at the specified that the target line remains at the specified
fraction of the fraction of the
screen height. If any form of the ‐j option is screen height. If any form of the ‐j option is
used, repeated used, repeated
forward searches (invoked with "n" or "N") begin at forward searches (invoked with "n" or "N") begin at
the line im‐ the line im‐
mediately after the target line, and repeated back- mediately after the target line, and repeated
ward searches backward searches
begin at the target line, unless changed by ‐a or begin at the target line, unless changed by ‐a or
‐A. For exam‐ ‐A. For exam‐
ple, if "‐j4" is used, the target line is the ple, if "‐j4" is used, the target line is the
fourth line on the fourth line on the
screen, so forward searches begin at the screen, so forward searches begin at the fifth
fifth line on the line on the
screen. However nonrepeated searches (invoked with screen. However nonrepeated searches (invoked
"/" or "?") with "/" or "?")
always begin at the start or end of the current always begin at the start or end of the current
screen respec‐ screen respec‐
tively. tively.
‐J or ‐‐status‐column ‐J or ‐‐status‐column
Displays a status column at the left edge of the Displays a status column at the left edge of the
screen. The screen. The
status column shows the lines that matched the status column shows the lines that matched the
current search, current search,
and any lines that are marked (via the m or M com- and any lines that are marked (via the m or M com-
mand). mand).
‐k[4mfilename[24m or ‐‐lesskey‐file=[4mfilename[0m ‐k[4mfilename[24m or ‐‐lesskey‐file=[4mfilename[0m
Causes [4mless[24m to open and interpret the named Causes [4mless[24m to open and interpret the named
file as a [4mlesskey[24m(1) file as a [4mlesskey[24m(1)
file. Multiple ‐k options may be specified. If file. Multiple ‐k options may be specified. If
the LESSKEY or the LESSKEY or
LESSKEY_SYSTEM environment variable is set, or if a LESSKEY_SYSTEM environment variable is set, or if a
lesskey file lesskey file
is found in a standard place (see KEY BINDINGS), it is found in a standard place (see KEY BINDINGS), it
is also used is also used
as a [4mlesskey[24m file. as a [4mlesskey[24m file.
‐K or ‐‐quit‐on‐intr ‐K or ‐‐quit‐on‐intr
Causes [4mless[24m to exit immediately (with status Causes [4mless[24m to exit immediately (with sta-
2) when an inter‐ tus 2) when an inter‐
rupt character (usually ^C) is typed. Normally, rupt character (usually ^C) is typed. Normally,
an interrupt an interrupt
character causes [4mless[24m to stop whatever it is character causes [4mless[24m to stop whatever it is
doing and return to doing and return to
its command prompt. Note that use of this option its command prompt. Note that use of this option
makes it im‐ makes it im‐
possible to return to the command prompt from the possible to return to the command prompt from the
"F" command. "F" command.
‐L or ‐‐no‐lessopen ‐L or ‐‐no‐lessopen
Ignore the LESSOPEN environment variable (see the Ignore the LESSOPEN environment variable (see
INPUT PRE‐ the INPUT PRE‐
PROCESSOR section below). This option can be PROCESSOR section below). This option can be set
set from within from within
[4mless[24m, but it will apply only to files opened [4mless[24m, but it will apply only to files
subsequently, not opened subsequently, not
to the file which is currently open. to the file which is currently open.
‐m or ‐‐long‐prompt ‐m or ‐‐long‐prompt
Causes [4mless[24m to prompt verbosely (like Causes [4mless[24m to prompt verbosely (like
[4mmore[24m), with the percent [4mmore[24m), with the percent
into the file. By default, [4mless[24m prompts into the file. By default, [4mless[24m prompts
with a colon. with a colon.
‐M or ‐‐LONG‐PROMPT ‐M or ‐‐LONG‐PROMPT
Causes [4mless[24m to prompt even more verbosely Causes [4mless[24m to prompt even more verbosely
than [4mmore[24m. than [4mmore[24m.
‐n or ‐‐line‐numbers ‐n or ‐‐line‐numbers
Suppresses line numbers. The default (to use line Suppresses line numbers. The default (to use line
numbers) may numbers) may
cause [4mless[24m to run more slowly in some cas- cause [4mless[24m to run more slowly in some cases,
es, especially with a especially with a
very large input file. Suppressing line numbers very large input file. Suppressing line numbers
with the ‐n op‐ with the ‐n op‐
tion will avoid this problem. Using line num- tion will avoid this problem. Using line numbers
bers means: the means: the
line number will be displayed in the verbose prompt line number will be displayed in the verbose prompt
and in the = and in the =
command, and the v command will pass the current command, and the v command will pass the current
line number to line number to
the editor (see also the discussion of LESSEDIT in the editor (see also the discussion of LESSEDIT
PROMPTS be‐ in PROMPTS be‐
low). low).
‐N or ‐‐LINE‐NUMBERS ‐N or ‐‐LINE‐NUMBERS
Causes a line number to be displayed at the be- Causes a line number to be displayed at the begin-
ginning of each ning of each
line in the display. line in the display.
‐o[4mfilename[24m or ‐‐log‐file=[4mfilename[0m ‐o[4mfilename[24m or ‐‐log‐file=[4mfilename[0m
Causes [4mless[24m to copy its input to the named Causes [4mless[24m to copy its input to the named
file as it is being file as it is being
viewed. This applies only when the input file is a viewed. This applies only when the input file is a
pipe, not an pipe, not an
ordinary file. If the file already exists, ordinary file. If the file already exists,
[4mless[24m will ask for [4mless[24m will ask for
confirmation before overwriting it. confirmation before overwriting it.
‐O[4mfilename[24m or ‐‐LOG‐FILE=[4mfilename[0m ‐O[4mfilename[24m or ‐‐LOG‐FILE=[4mfilename[0m
The ‐O option is like ‐o, but it will overwrite an The ‐O option is like ‐o, but it will overwrite an
existing file existing file
without asking for confirmation. without asking for confirmation.
If no log file has been specified, the ‐o and ‐O If no log file has been specified, the ‐o and ‐O
options can be options can be
used from within [4mless[24m to specify a log used from within [4mless[24m to specify a log
file. Without a file file. Without a file
name, they will simply report the name of the log name, they will simply report the name of the log
file. The "s" file. The "s"
command is equivalent to specifying ‐o from within command is equivalent to specifying ‐o from within
[4mless[24m. [4mless[24m.
‐p[4mpattern[24m or ‐‐pattern=[4mpattern[0m ‐p[4mpattern[24m or ‐‐pattern=[4mpattern[0m
The ‐p option on the command line is equivalent The ‐p option on the command line is equivalent
to specifying to specifying
+/[4mpattern[24m; that is, it tells [4mless[24m to +/[4mpattern[24m; that is, it tells [4mless[24m
start at the first occur‐ to start at the first occur‐
rence of [4mpattern[24m in the file. rence of [4mpattern[24m in the file.
‐P[4mprompt[24m or ‐‐prompt=[4mprompt[0m ‐P[4mprompt[24m or ‐‐prompt=[4mprompt[0m
Provides a way to tailor the three prompt Provides a way to tailor the three prompt styles
styles to your own to your own
preference. This option would normally be put in preference. This option would normally be put in
the LESS envi‐ the LESS envi‐
ronment variable, rather than being typed in with ronment variable, rather than being typed in with
each [4mless[24m com‐ each [4mless[24m com‐
mand. Such an option must either be the last op- mand. Such an option must either be the last op-
tion in the LESS tion in the LESS
variable, or be terminated by a dollar sign. variable, or be terminated by a dollar sign.
‐Ps followed by a string changes the default ‐Ps followed by a string changes the default
(short) prompt to (short) prompt to
that string. that string.
‐Pm changes the medium (‐m) prompt. ‐Pm changes the medium (‐m) prompt.
‐PM changes the long (‐M) prompt. ‐PM changes the long (‐M) prompt.
‐Ph changes the prompt for the help screen. ‐Ph changes the prompt for the help screen.
‐P= changes the message printed by the = command. ‐P= changes the message printed by the = command.
‐Pw changes the message printed while waiting for ‐Pw changes the message printed while waiting for
data (in the data (in the
F command). F command).
All prompt strings consist of a sequence of let- All prompt strings consist of a sequence of letters
ters and special and special
escape sequences. See the section on PROMPTS for escape sequences. See the section on PROMPTS for
more details. more details.
‐q or ‐‐quiet or ‐‐silent ‐q or ‐‐quiet or ‐‐silent
Causes moderately "quiet" operation: the terminal Causes moderately "quiet" operation: the termi-
bell is not nal bell is not
rung if an attempt is made to scroll past the end rung if an attempt is made to scroll past the end
of the file or of the file or
before the beginning of the file. If the terminal before the beginning of the file. If the terminal
has a "visual has a "visual
bell", it is used instead. The bell will be bell", it is used instead. The bell will be rung
rung on certain on certain
other errors, such as typing an invalid character. other errors, such as typing an invalid character.
The default The default
is to ring the terminal bell in all such cases. is to ring the terminal bell in all such cases.
‐Q or ‐‐QUIET or ‐‐SILENT ‐Q or ‐‐QUIET or ‐‐SILENT
Causes totally "quiet" operation: the terminal Causes totally "quiet" operation: the terminal
bell is never bell is never
rung. If the terminal has a "visual bell", it is rung. If the terminal has a "visual bell", it
used in all is used in all
cases where the terminal bell would have been rung. cases where the terminal bell would have been rung.
‐r or ‐‐raw‐control‐chars ‐r or ‐‐raw‐control‐chars
Causes "raw" control characters to be displayed. Causes "raw" control characters to be displayed.
The default is The default is
to display control characters using the caret nota- to display control characters using the caret no-
tion; for ex‐ tation; for ex‐
ample, a control‐A (octal 001) is displayed as ample, a control‐A (octal 001) is displayed as
"^A". Warning: "^A". Warning:
when the ‐r option is used, [4mless[24m cannot keep when the ‐r option is used, [4mless[24m cannot keep
track of the actual track of the actual
appearance of the screen (since this depends on appearance of the screen (since this depends on how
how the screen the screen
responds to each type of control character). Thus, responds to each type of control character). Thus,
various dis‐ various dis‐
play problems may result, such as long lines being play problems may result, such as long lines being
split in the split in the
wrong place. wrong place.
USE OF THE ‐r OPTION IS NOT RECOMMENDED.
‐R or ‐‐RAW‐CONTROL‐CHARS ‐R or ‐‐RAW‐CONTROL‐CHARS
Like ‐r, but only ANSI "color" escape sequences and Like ‐r, but only ANSI "color" escape sequences and
OSC 8 hyper‐ OSC 8 hyper‐
link sequences are output in "raw" form. Unlike link sequences are output in "raw" form. Unlike
‐r, the screen ‐r, the screen
appearance is maintained correctly, provided that appearance is maintained correctly, provided that
there are no there are no
escape sequences in the file other than these escape sequences in the file other than these
types of escape types of escape
sequences. Color escape sequences are only sup- sequences. Color escape sequences are only sup-
ported when the ported when the
color is changed within one line, not across color is changed within one line, not across
lines. In other lines. In other
words, the beginning of each line is assumed to be words, the beginning of each line is assumed to be
normal (non‐ normal (non‐
colored), regardless of any escape sequences in colored), regardless of any escape sequences in
previous lines. previous lines.
For the purpose of keeping track of screen appear- For the purpose of keeping track of screen appear-
ance, these es‐ ance, these es‐
cape sequences are assumed to not move the cursor. cape sequences are assumed to not move the cursor.
OSC 8 hyperlinks are sequences of the form: OSC 8 hyperlinks are sequences of the form:
ESC ] 8 ; ... 7 ESC ] 8 ; ... 7
The terminating sequence may be either a BEL The terminating sequence may be either a BEL char-
character (7) or acter (7) or
the two‐character sequence "ESC the two‐character sequence "ESC
ANSI color escape sequences are sequences of the ANSI color escape sequences are sequences of the
form: form:
ESC [ ... m ESC [ ... m
where the "..." is zero or more color specification where the "..." is zero or more color specifica-
characters. tion characters.
You can make [4mless[24m think that characters You can make [4mless[24m think that characters oth-
other than "m" can end er than "m" can end
ANSI color escape sequences by setting the environ- ANSI color escape sequences by setting the envi-
ment variable ronment variable
LESSANSIENDCHARS to the list of characters which LESSANSIENDCHARS to the list of characters which
can end a color can end a color
escape sequence. And you can make [4mless[24m escape sequence. And you can make [4mless[24m
think that characters think that characters
other than the standard ones may appear between other than the standard ones may appear between the
the ESC and the ESC and the
m by setting the environment variable LESSANSIMID- m by setting the environment variable LESSAN-
CHARS to the SIMIDCHARS to the
list of characters which can appear. list of characters which can appear.
‐s or ‐‐squeeze‐blank‐lines ‐s or ‐‐squeeze‐blank‐lines
Causes consecutive blank lines to be squeezed Causes consecutive blank lines to be squeezed
into a single into a single
blank line. This is useful when viewing [4mn- blank line. This is useful when viewing [4mn-
roff[24m output. roff[24m output.
‐S or ‐‐chop‐long‐lines ‐S or ‐‐chop‐long‐lines
Causes lines longer than the screen width to be Causes lines longer than the screen width to be
chopped (trun‐ chopped (trun‐
cated) rather than wrapped. That is, the portion cated) rather than wrapped. That is, the portion
of a long line of a long line
that does not fit in the screen width is not dis- that does not fit in the screen width is not dis-
played until you played until you
press RIGHT‐ARROW. The default is to wrap long press RIGHT‐ARROW. The default is to wrap long
lines; that is, lines; that is,
display the remainder on the next line. display the remainder on the next line.
‐t[4mtag[24m or ‐‐tag=[4mtag[0m ‐t[4mtag[24m or ‐‐tag=[4mtag[0m
The ‐t option, followed immediately by a TAG, will The ‐t option, followed immediately by a TAG, will
edit the file edit the file
containing that tag. For this to work, tag infor- containing that tag. For this to work, tag infor-
mation must be mation must be
available; for example, there may be a file in the available; for example, there may be a file in
current di‐ the current di‐
rectory called "tags", which was previously built rectory called "tags", which was previously built
by [4mctags[24m(1) or by [4mctags[24m(1) or
an equivalent command. If the environment variable an equivalent command. If the environment variable
LESSGLOBALT‐ LESSGLOBALT‐
AGS is set, it is taken to be the name of a com- AGS is set, it is taken to be the name of a com-
mand compatible mand compatible
with [4mglobal[24m(1), and that command is executed with [4mglobal[24m(1), and that command is exe-
to find the tag. cuted to find the tag.
(See http://www.gnu.org/software/global/glob- (See http://www.gnu.org/software/global/glob-
al.html). The ‐t al.html). The ‐t
option may also be specified from within option may also be specified from within
[4mless[24m (using the ‐ com‐ [4mless[24m (using the ‐ com‐
mand) as a way of examining a new file. The mand) as a way of examining a new file. The com-
command ":t" is mand ":t" is
equivalent to specifying ‐t from within equivalent to specifying ‐t from within
[4mless[24m. [4mless[24m.
‐T[4mtagsfile[24m or ‐‐tag‐file=[4mtagsfile[0m ‐T[4mtagsfile[24m or ‐‐tag‐file=[4mtagsfile[0m
Specifies a tags file to be used instead of "tags". Specifies a tags file to be used instead of "tags".
‐u or ‐‐underline‐special ‐u or ‐‐underline‐special
Causes backspaces and carriage returns to be treat- Causes backspaces and carriage returns to be
ed as print‐ treated as print‐
able characters; that is, they are sent to the able characters; that is, they are sent to the
terminal when terminal when
they appear in the input. they appear in the input.
‐U or ‐‐UNDERLINE‐SPECIAL ‐U or ‐‐UNDERLINE‐SPECIAL
Causes backspaces, tabs, carriage returns and "for- Causes backspaces, tabs, carriage returns and
matting char‐ "formatting char‐
acters" (as defined by Unicode) to be treated as acters" (as defined by Unicode) to be treated as
control charac‐ control charac‐
ters; that is, they are handled as specified by the ters; that is, they are handled as specified by the
‐r option. ‐r option.
By default, if neither ‐u nor ‐U is given, By default, if neither ‐u nor ‐U is given,
backspaces which ap‐ backspaces which ap‐
pear adjacent to an underscore character are pear adjacent to an underscore character are treat-
treated specially: ed specially:
the underlined text is displayed using the termi- the underlined text is displayed using the termi-
nal’s hardware nal’s hardware
underlining capability. Also, backspaces which underlining capability. Also, backspaces which
appear between appear between
two identical characters are treated specially: two identical characters are treated specially:
the overstruck the overstruck
text is printed using the terminal’s hardware bold- text is printed using the terminal’s hardware bold-
face capabili‐ face capabili‐
ty. Other backspaces are deleted, along with ty. Other backspaces are deleted, along with
the preceding the preceding
character. Carriage returns immediately followed character. Carriage returns immediately followed
by a newline by a newline
are deleted. Other carriage returns are handled as are deleted. Other carriage returns are handled as
specified by specified by
the ‐r option. Unicode formatting characters, the ‐r option. Unicode formatting characters, such
such as the Byte as the Byte
Order Mark, are sent to the terminal. Text which Order Mark, are sent to the terminal. Text which
is overstruck is overstruck
or underlined can be searched for if neither ‐u nor or underlined can be searched for if neither ‐u nor
‐U is in ef‐ ‐U is in ef‐
fect. fect.
‐V or ‐‐version ‐V or ‐‐version
Displays the version number of [4mless[24m. Displays the version number of [4mless[24m.
‐w or ‐‐hilite‐unread ‐w or ‐‐hilite‐unread
Temporarily highlights the first "new" line af- Temporarily highlights the first "new" line
ter a forward after a forward
movement of a full page. The first "new" line is movement of a full page. The first "new" line is
the line imme‐ the line imme‐
diately following the line previously at the diately following the line previously at the
bottom of the bottom of the
screen. Also highlights the target line after a g screen. Also highlights the target line after a g
or p command. or p command.
The highlight is removed at the next command which The highlight is removed at the next command which
causes move‐ causes move‐
ment. The entire line is highlighted, unless the ment. The entire line is highlighted, unless the
‐J option is ‐J option is
in effect, in which case only the status column is in effect, in which case only the status column is
highlighted. highlighted.
‐W or ‐‐HILITE‐UNREAD ‐W or ‐‐HILITE‐UNREAD
Like ‐w, but temporarily highlights the first new Like ‐w, but temporarily highlights the first new
line after any line after any
forward movement command larger than one line. forward movement command larger than one line.
‐x[4mn[24m,... or ‐‐tabs=[4mn[24m,... ‐x[4mn[24m,... or ‐‐tabs=[4mn[24m,...
Sets tab stops. If only one [4mn[24m is speci- Sets tab stops. If only one [4mn[24m is specified,
fied, tab stops are set tab stops are set
at multiples of [4mn[24m. If multiple values sepa- at multiples of [4mn[24m. If multiple values
rated by commas are separated by commas are
specified, tab stops are set at those positions, specified, tab stops are set at those positions,
and then con‐ and then con‐
tinue with the same spacing as the last two. tinue with the same spacing as the last two.
For example, For example,
[4m‐x9,17[24m will set tabs at positions 9, 17, [4m‐x9,17[24m will set tabs at positions 9, 17, 25,
25, 33, etc. The de‐ 33, etc. The de‐
fault for [4mn[24m is 8. fault for [4mn[24m is 8.
‐X or ‐‐no‐init ‐X or ‐‐no‐init
Disables sending the termcap initialization and Disables sending the termcap initialization and
deinitialization deinitialization
strings to the terminal. This is sometimes de- strings to the terminal. This is sometimes de-
sirable if the sirable if the
deinitialization string does something unnecessary, deinitialization string does something unneces-
like clear‐ sary, like clear‐
ing the screen. ing the screen.
‐y[4mn[24m or ‐‐max‐forw‐scroll=[4mn[0m ‐y[4mn[24m or ‐‐max‐forw‐scroll=[4mn[0m
Specifies a maximum number of lines to scroll for- Specifies a maximum number of lines to scroll for-
ward. If it is ward. If it is
necessary to scroll forward more than [4mn[24m necessary to scroll forward more than [4mn[24m
lines, the screen is re‐ lines, the screen is re‐
painted instead. The ‐c or ‐C option may be painted instead. The ‐c or ‐C option may be used
used to repaint to repaint
from the top of the screen if desired. By default, from the top of the screen if desired. By de-
any forward fault, any forward
movement causes scrolling. movement causes scrolling.
‐z[4mn[24m or ‐‐window=[4mn[24m or ‐[4mn[0m ‐z[4mn[24m or ‐‐window=[4mn[24m or ‐[4mn[0m
Changes the default scrolling window size to Changes the default scrolling window size to
[4mn[24m lines. The de‐ [4mn[24m lines. The de‐
fault is one screenful. The z and w commands can fault is one screenful. The z and w commands can
also be used also be used
to change the window size. The "z" may be omitted to change the window size. The "z" may be omitted
for compati‐ for compati‐
bility with some versions of [4mmore[24m. If the bility with some versions of [4mmore[24m. If the
number [4mn[24m is negative, number [4mn[24m is negative,
it indicates [4mn[24m lines less than the current it indicates [4mn[24m lines less than the current
screen size. For ex‐ screen size. For ex‐
ample, if the screen is 24 lines, [4m‐z‐4[24m sets ample, if the screen is 24 lines, [4m‐z‐4[24m sets
the scrolling window the scrolling window
to 20 lines. If the screen is resized to to 20 lines. If the screen is resized to 40
40 lines, the lines, the
scrolling window automatically changes to 36 lines. scrolling window automatically changes to 36 lines.
‐"[4mcc[24m or ‐‐quotes=[4mcc[0m ‐"[4mcc[24m or ‐‐quotes=[4mcc[0m
Changes the filename quoting character. This may Changes the filename quoting character. This may
be necessary be necessary
if you are trying to name a file which contains if you are trying to name a file which contains
both spaces and both spaces and
quote characters. Followed by a single character, quote characters. Followed by a single character,
this changes this changes
the quote character to that character. Filenames the quote character to that character. Filenames
containing a containing a
space should then be surrounded by that character space should then be surrounded by that character
rather than by rather than by
double quotes. Followed by two characters, double quotes. Followed by two characters,
changes the open changes the open
quote to the first character, and the close quote quote to the first character, and the close quote
to the second to the second
character. Filenames containing a space should character. Filenames containing a space should
then be preceded then be preceded
by the open quote character and followed by the by the open quote character and followed by
close quote the close quote
character. Note that even after the quote character. Note that even after the quote
characters are characters are
changed, this option remains ‐" (a dash followed changed, this option remains ‐" (a dash fol-
by a double lowed by a double
quote). quote).
‐~ or ‐‐tilde ‐~ or ‐‐tilde
Normally lines after end of file are displayed as a Normally lines after end of file are displayed as a
single tilde single tilde
(~). This option causes lines after end of file to (~). This option causes lines after end of file to
be displayed be displayed
as blank lines. as blank lines.
‐# or ‐‐shift ‐# or ‐‐shift
Specifies the default number of positions to scroll Specifies the default number of positions to scroll
horizontally horizontally
in the RIGHTARROW and LEFTARROW commands. If the in the RIGHTARROW and LEFTARROW commands. If the
number speci‐ number speci‐
fied is zero, it sets the default number of po- fied is zero, it sets the default number of posi-
sitions to one tions to one
half of the screen width. Alternately, the number half of the screen width. Alternately, the number
may be speci‐ may be speci‐
fied as a fraction of the width of the screen, fied as a fraction of the width of the screen,
starting with a starting with a
decimal point: .5 is half of the screen width, decimal point: .5 is half of the screen
.3 is three width, .3 is three
tenths of the screen width, and so on. If the tenths of the screen width, and so on. If the num-
number is speci‐ ber is speci‐
fied as a fraction, the actual number of scroll po- fied as a fraction, the actual number of scroll po-
sitions is re‐ sitions is re‐
calculated if the terminal window is resized, so calculated if the terminal window is resized, so
that the actual that the actual
scroll remains at the specified fraction of the scroll remains at the specified fraction of the
screen width. screen width.
‐‐follow‐name ‐‐follow‐name
Normally, if the input file is renamed while an F Normally, if the input file is renamed while an F
command is ex‐ command is ex‐
ecuting, [4mless[24m will continue to display the ecuting, [4mless[24m will continue to display the
contents of the orig‐ contents of the orig‐
inal file despite its name change. If ‐‐follow‐ inal file despite its name change. If ‐‐follow‐
name is speci‐ name is speci‐
fied, during an F command [4mless[24m will period- fied, during an F command [4mless[24m will periodi-
ically attempt to re‐ cally attempt to re‐
open the file by name. If the reopen succeeds and open the file by name. If the reopen succeeds and
the file is a the file is a
different file from the original (which means different file from the original (which means that
that a new file a new file
has been created with the same name as the origi- has been created with the same name as the
nal (now re‐ original (now re‐
named) file), [4mless[24m will display the contents named) file), [4mless[24m will display the contents
of that new file. of that new file.
‐‐incsearch ‐‐incsearch
Subsequent search commands will be "incremental"; Subsequent search commands will be "incremental";
that is, [4mless[0m that is, [4mless[0m
will advance to the next line containing the search will advance to the next line containing the
pattern as search pattern as
each character of the pattern is typed in. each character of the pattern is typed in.
‐‐line‐num‐width ‐‐line‐num‐width
Sets the minimum width of the line number field Sets the minimum width of the line number field
when the ‐N op‐ when the ‐N op‐
tion is in effect. The default is 7 characters. tion is in effect. The default is 7 characters.
‐‐mouse ‐‐mouse
Enables mouse input: scrolling the mouse wheel down Enables mouse input: scrolling the mouse wheel
moves for‐ down moves for‐
ward in the file, scrolling the mouse wheel up ward in the file, scrolling the mouse wheel up
moves backwards moves backwards
in the file, and clicking the mouse sets the "#" in the file, and clicking the mouse sets the
mark to the "#" mark to the
line where the mouse is clicked. The number of line where the mouse is clicked. The number of
lines to scroll lines to scroll
when the wheel is moved can be set by the ‐‐wheel‐ when the wheel is moved can be set by the ‐‐wheel‐
lines option. lines option.
Mouse input works only on terminals which support Mouse input works only on terminals which support
X11 mouse re‐ X11 mouse re‐
porting, and on the Windows version of [4mless[24m. porting, and on the Windows version of [4mless[24m.
‐‐MOUSE ‐‐MOUSE
Like ‐‐mouse, except the direction scrolled on Like ‐‐mouse, except the direction scrolled on
mouse wheel move‐ mouse wheel move‐
ment is reversed. ment is reversed.
‐‐no‐keypad ‐‐no‐keypad
Disables sending the keypad initialization and Disables sending the keypad initialization and
deinitialization deinitialization
strings to the terminal. This is sometimes useful strings to the terminal. This is sometimes useful
if the keypad if the keypad
strings make the numeric keypad behave in an unde- strings make the numeric keypad behave in an unde-
sirable manner. sirable manner.
‐‐no‐histdups ‐‐no‐histdups
This option changes the behavior so that if a This option changes the behavior so that if a
search string or search string or
file name is typed in, and the same string is al- file name is typed in, and the same string is
ready in the already in the
history list, the existing copy is removed from the history list, the existing copy is removed from the
history list history list
before the new one is added. Thus, a given string before the new one is added. Thus, a given
will appear string will appear
only once in the history list. Normally, a only once in the history list. Normally, a string
string may appear may appear
multiple times. multiple times.
‐‐rscroll ‐‐rscroll
This option changes the character used to mark This option changes the character used to mark
truncated lines. truncated lines.
It may begin with a two‐character attribute indica- It may begin with a two‐character attribute indica-
tor like LESS‐ tor like LESS‐
BINFMT does. If there is no attribute indicator, BINFMT does. If there is no attribute indica-
standout is tor, standout is
used. If set to "‐", truncated lines are not used. If set to "‐", truncated lines are not
marked. marked.
‐‐save‐marks ‐‐save‐marks
Save marks in the history file, so marks are Save marks in the history file, so marks are re-
retained across tained across
different invocations of [4mless[24m. different invocations of [4mless[24m.
‐‐status‐col‐width ‐‐status‐col‐width
Sets the width of the status column when the ‐J op- Sets the width of the status column when the ‐J op-
tion is in ef‐ tion is in ef‐
fect. The default is 2 characters. fect. The default is 2 characters.
‐‐use‐backslash ‐‐use‐backslash
This option changes the interpretations of options This option changes the interpretations of options
which follow which follow
this one. After the ‐‐use‐backslash option, any this one. After the ‐‐use‐backslash option, any
backslash in an backslash in an
option string is removed and the following char- option string is removed and the following charac-
acter is taken ter is taken
literally. This allows a dollar sign to be includ- literally. This allows a dollar sign to be in-
ed in option cluded in option
strings. strings.
‐‐use‐color ‐‐use‐color
Enables the colored text in various places. The Enables the colored text in various places. The ‐D
‐D option can option can
be used to change the colors. Colored text works be used to change the colors. Colored text
only if the works only if the
terminal supports ANSI color escape sequences (as terminal supports ANSI color escape sequences (as
defined in EC‐ defined in EC‐
MA‐48 SGR; see MA‐48 SGR; see
https://www.ecma‐international.org/publications‐ https://www.ecma‐international.org/publications‐
and‐ and‐
standards/standards/ecma‐48). standards/standards/ecma‐48).
‐‐wheel‐lines=[4mn[0m ‐‐wheel‐lines=[4mn[0m
Set the number of lines to scroll when the Set the number of lines to scroll when the
mouse wheel is mouse wheel is
scrolled and the ‐‐mouse or ‐‐MOUSE option is in scrolled and the ‐‐mouse or ‐‐MOUSE option is in
effect. The effect. The
default is 1 line. default is 1 line.
‐‐ A command line argument of "‐‐" marks the end of ‐‐ A command line argument of "‐‐" marks the end of
option argu‐ option argu‐
ments. Any arguments following this are inter- ments. Any arguments following this are inter-
preted as file‐ preted as file‐
names. This can be useful when viewing a file names. This can be useful when viewing a file
whose name begins whose name begins
with a "‐" or "+". with a "‐" or "+".
+ If a command line option begins with [1m+[22m, the + If a command line option begins with [1m+[22m,
remainder of that the remainder of that
option is taken to be an initial command to option is taken to be an initial command to
[4mless[24m. For example, [4mless[24m. For example,
+G tells [4mless[24m to start at the end of the +G tells [4mless[24m to start at the end of the
file rather than the file rather than the
beginning, and +/xyz tells it to start at the beginning, and +/xyz tells it to start at the
first occurrence first occurrence
of "xyz" in the file. As a special case, +<num- of "xyz" in the file. As a special case, +<num-
ber> acts like ber> acts like
+<number>g; that is, it starts the display at the +<number>g; that is, it starts the display at the
specified line specified line
number (however, see the caveat under the "g" number (however, see the caveat under the "g"
command above). command above).
If the option starts with ++, the initial command If the option starts with ++, the initial command
applies to ev‐ applies to ev‐
ery file being viewed, not just the first one. ery file being viewed, not just the first one.
The + command The + command
described previously may also be used to set (or described previously may also be used to set (or
change) an ini‐ change) an ini‐
tial command for every file. tial command for every file.
[1mLINE EDITING[0m [1mLINE EDITING[0m
When entering a command line at the bottom of the screen When entering a command line at the bottom of the screen
(for example, (for example,
a filename for the :e command, or the pattern for a a filename for the :e command, or the pattern for a
search command), search command),
certain keys can be used to manipulate the command line. certain keys can be used to manipulate the command line.
Most commands Most commands
have an alternate form in [ brackets ] which can be used have an alternate form in [ brackets ] which can be used
if a key does if a key does
not exist on a particular keyboard. (Note that the not exist on a particular keyboard. (Note that the
forms beginning forms beginning
with ESC do not work in some MS‐DOS and Windows systems with ESC do not work in some MS‐DOS and Windows systems
because ESC is because ESC is
the line erase character.) Any of these special keys may the line erase character.) Any of these special keys
be entered may be entered
literally by preceding it with the "literal" character, literally by preceding it with the "literal" character,
either ^V or either ^V or
^A. A backslash itself may also be entered literally by ^A. A backslash itself may also be entered literally by
entering two entering two
backslashes. backslashes.
LEFTARROW [ ESC‐h ] LEFTARROW [ ESC‐h ]
Move the cursor one space to the left. Move the cursor one space to the left.
RIGHTARROW [ ESC‐l ] RIGHTARROW [ ESC‐l ]
Move the cursor one space to the right. Move the cursor one space to the right.
^LEFTARROW [ ESC‐b or ESC‐LEFTARROW ] ^LEFTARROW [ ESC‐b or ESC‐LEFTARROW ]
(That is, CONTROL and LEFTARROW simultaneously.) (That is, CONTROL and LEFTARROW simultaneously.)
Move the cur‐ Move the cur‐
sor one word to the left. sor one word to the left.
^RIGHTARROW [ ESC‐w or ESC‐RIGHTARROW ] ^RIGHTARROW [ ESC‐w or ESC‐RIGHTARROW ]
(That is, CONTROL and RIGHTARROW simultaneously.) (That is, CONTROL and RIGHTARROW simultaneously.)
Move the cur‐ Move the cur‐
sor one word to the right. sor one word to the right.
HOME [ ESC‐0 ] HOME [ ESC‐0 ]
Move the cursor to the beginning of the line. Move the cursor to the beginning of the line.
END [ ESC‐$ ] END [ ESC‐$ ]
Move the cursor to the end of the line. Move the cursor to the end of the line.
BACKSPACE BACKSPACE
Delete the character to the left of the cursor, Delete the character to the left of the cursor, or
or cancel the cancel the
command if the command line is empty. command if the command line is empty.
DELETE or [ ESC‐x ] DELETE or [ ESC‐x ]
Delete the character under the cursor. Delete the character under the cursor.
^BACKSPACE [ ESC‐BACKSPACE ] ^BACKSPACE [ ESC‐BACKSPACE ]
(That is, CONTROL and BACKSPACE simultaneously.) (That is, CONTROL and BACKSPACE simultaneous-
Delete the ly.) Delete the
word to the left of the cursor. word to the left of the cursor.
^DELETE [ ESC‐X or ESC‐DELETE ] ^DELETE [ ESC‐X or ESC‐DELETE ]
(That is, CONTROL and DELETE simultaneously.) (That is, CONTROL and DELETE simultaneously.)
Delete the word Delete the word
under the cursor. under the cursor.
UPARROW [ ESC‐k ] UPARROW [ ESC‐k ]
Retrieve the previous command line. If you first Retrieve the previous command line. If you
enter some first enter some
text and then press UPARROW, it will retrieve the text and then press UPARROW, it will retrieve the
previous com‐ previous com‐
mand which begins with that text. mand which begins with that text.
DOWNARROW [ ESC‐j ] DOWNARROW [ ESC‐j ]
Retrieve the next command line. If you first en- Retrieve the next command line. If you first
ter some text enter some text
and then press DOWNARROW, it will retrieve the and then press DOWNARROW, it will retrieve the
next command next command
which begins with that text. which begins with that text.
TAB Complete the partial filename to the left of the TAB Complete the partial filename to the left of the
cursor. If it cursor. If it
matches more than one filename, the first match is matches more than one filename, the first match is
entered into entered into
the command line. Repeated TABs will cycle the command line. Repeated TABs will cycle
thru the other thru the other
matching filenames. If the completed filename is a matching filenames. If the completed filename is a
directory, a directory, a
"/" is appended to the filename. (On MS‐DOS sys- "/" is appended to the filename. (On MS‐DOS sys-
tems, a " tems, a "
appended.) The environment variable LESSSEPARA- appended.) The environment variable LESSSEPARATOR
TOR can be used can be used
to specify a different character to append to a di- to specify a different character to append to a di-
rectory name. rectory name.
BACKTAB [ ESC‐TAB ] BACKTAB [ ESC‐TAB ]
Like, TAB, but cycles in the reverse direction thru Like, TAB, but cycles in the reverse direction thru
the matching the matching
filenames. filenames.
^L Complete the partial filename to the left of the ^L Complete the partial filename to the left of the
cursor. If it cursor. If it
matches more than one filename, all matches are en- matches more than one filename, all matches are en-
tered into the tered into the
command line (if they fit). command line (if they fit).
^U (Unix and OS/2) or ESC (MS‐DOS) ^U (Unix and OS/2) or ESC (MS‐DOS)
Delete the entire command line, or cancel the Delete the entire command line, or cancel the
command if the command if the
command line is empty. If you have changed your command line is empty. If you have changed your
line‐kill char‐ line‐kill char‐
acter in Unix to something other than ^U, that acter in Unix to something other than ^U, that
character is used character is used
instead of ^U. instead of ^U.
^G Delete the entire command line and return to the ^G Delete the entire command line and return to the
main prompt. main prompt.
[1mKEY BINDINGS[0m [1mKEY BINDINGS[0m
You may define your own [4mless[24m commands by using the You may define your own [4mless[24m commands by using
program [4mlesskey[24m(1) the program [4mlesskey[24m(1)
to create a lesskey file. This file specifies a set of to create a lesskey file. This file specifies a set of
command keys command keys
and an action associated with each key. You may also use and an action associated with each key. You may also
[4mlesskey[24m to use [4mlesskey[24m to
change the line‐editing keys (see LINE EDITING), and to change the line‐editing keys (see LINE EDITING), and to
set environment set environment
variables. If the environment variable LESSKEY is set, variables. If the environment variable LESSKEY is set,
[4mless[24m uses that [4mless[24m uses that
as the name of the lesskey file. Otherwise, [4mless[24m as the name of the lesskey file. Otherwise, [4mless[24m
looks in a standard looks in a standard
place for the lesskey file: On Unix systems, [4mless[24m place for the lesskey file: On Unix systems, [4mless[24m
looks for a lesskey looks for a lesskey
file called "$HOME/.less". On MS‐DOS and Windows sys- file called "$HOME/.less". On MS‐DOS and Windows systems,
tems, [4mless[24m looks [4mless[24m looks
for a lesskey file called "$HOME/_less", and if it is not for a lesskey file called "$HOME/_less", and if it is not
found there, found there,
then looks for a lesskey file called "_less" in any direc- then looks for a lesskey file called "_less" in any direc-
tory specified tory specified
in the PATH environment variable. On OS/2 systems, in the PATH environment variable. On OS/2 systems,
[4mless[24m looks for a [4mless[24m looks for a
lesskey file called "$HOME/less.ini", and if it is lesskey file called "$HOME/less.ini", and if it is not
not found, then found, then
looks for a lesskey file called "less.ini" in any direc- looks for a lesskey file called "less.ini" in any direc-
tory specified tory specified
in the INIT environment variable, and if it not found in the INIT environment variable, and if it not found
there, then looks there, then looks
for a lesskey file called "less.ini" in any directory for a lesskey file called "less.ini" in any directory
specified in the specified in the
PATH environment variable. See the [4mlesskey[24m man- PATH environment variable. See the [4mlesskey[24m manual
ual page for more de‐ page for more de‐
tails. tails.
A system‐wide lesskey file may also be set up to provide A system‐wide lesskey file may also be set up to provide
key bindings. key bindings.
If a key is defined in both a local lesskey file and in If a key is defined in both a local lesskey file and in
the system‐wide the system‐wide
file, key bindings in the local file take precedence over file, key bindings in the local file take precedence over
those in the those in the
system‐wide file. If the environment variable system‐wide file. If the environment variable
LESSKEY_SYSTEM is set, LESSKEY_SYSTEM is set,
[4mless[24m uses that as the name of the system‐wide [4mless[24m uses that as the name of the system‐wide
lesskey file. Otherwise, lesskey file. Otherwise,
[4mless[24m looks in a standard place for the system‐ [4mless[24m looks in a standard place for the system‐wide
wide lesskey file: On lesskey file: On
Unix systems, the system‐wide lesskey file is /usr/lo- Unix systems, the system‐wide lesskey file is /usr/lo-
cal/etc/sysless. cal/etc/sysless.
(However, if [4mless[24m was built with a different (However, if [4mless[24m was built with a different
sysconf directory than sysconf directory than
/usr/local/etc, that directory is where the sysless file /usr/local/etc, that directory is where the sysless file
is found.) On is found.) On
MS‐DOS and Windows systems, the system‐wide lesskey MS‐DOS and Windows systems, the system‐wide lesskey file
file is c:_sys‐ is c:_sys‐
less. On OS/2 systems, the system‐wide lesskey file is less. On OS/2 systems, the system‐wide lesskey file is
c:less.ini. c:less.ini.
[1mINPUT PREPROCESSOR[0m [1mINPUT PREPROCESSOR[0m
You may define an "input preprocessor" for [4mless[24m. You may define an "input preprocessor" for [4mless[24m.
Before [4mless[24m opens a Before [4mless[24m opens a
file, it first gives your input preprocessor a chance to file, it first gives your input preprocessor a chance to
modify the way modify the way
the contents of the file are displayed. An input pre- the contents of the file are displayed. An input pre-
processor is sim‐ processor is sim‐
ply an executable program (or shell script), which writes ply an executable program (or shell script), which writes
the contents the contents
of the file to a different file, called the replacement of the file to a different file, called the replacement
file. The con‐ file. The con‐
tents of the replacement file are then displayed in tents of the replacement file are then displayed in place
place of the con‐ of the con‐
tents of the original file. However, it will appear to tents of the original file. However, it will appear to
the user as if the user as if
the original file is opened; that is, [4mless[24m will the original file is opened; that is, [4mless[24m will
display the original display the original
filename as the name of the current file. filename as the name of the current file.
An input preprocessor receives one command line argument, An input preprocessor receives one command line argument,
the original the original
filename, as entered by the user. It should create filename, as entered by the user. It should create the
the replacement replacement
file, and when finished, print the name of the replacement file, and when finished, print the name of the replace-
file to its ment file to its
standard output. If the input preprocessor does not out- standard output. If the input preprocessor does not out-
put a replace‐ put a replace‐
ment filename, [4mless[24m uses the original file, as nor- ment filename, [4mless[24m uses the original file, as
mal. The input pre‐ normal. The input pre‐
processor is not called when viewing standard input. To processor is not called when viewing standard input. To
set up an in‐ set up an in‐
put preprocessor, set the LESSOPEN environment variable put preprocessor, set the LESSOPEN environment variable
to a command to a command
line which will invoke your input preprocessor. This line which will invoke your input preprocessor. This
command line command line
should include one occurrence of the string "%s", which should include one occurrence of the string "%s",
will be re‐ which will be re‐
placed by the filename when the input preprocessor command placed by the filename when the input preprocessor command
is invoked. is invoked.
When [4mless[24m closes a file opened in such a way, it When [4mless[24m closes a file opened in such a way, it
will call another pro‐ will call another pro‐
gram, called the input postprocessor, which may perform gram, called the input postprocessor, which may per-
any desired form any desired
clean‐up action (such as deleting the replacement clean‐up action (such as deleting the replacement file
file created by created by
LESSOPEN). This program receives two command line argu- LESSOPEN). This program receives two command line argu-
ments, the orig‐ ments, the orig‐
inal filename as entered by the user, and the name of inal filename as entered by the user, and the name of the
the replacement replacement
file. To set up an input postprocessor, set the LESSCLOSE file. To set up an input postprocessor, set the LESS-
environment CLOSE environment
variable to a command line which will invoke your input variable to a command line which will invoke your input
postprocessor. postprocessor.
It may include two occurrences of the string "%s"; the It may include two occurrences of the string "%s"; the
first is re‐ first is re‐
placed with the original name of the file and the second placed with the original name of the file and the second
with the name with the name
of the replacement file, which was output by LESSOPEN. of the replacement file, which was output by LESSOPEN.
For example, on many Unix systems, these two scripts will For example, on many Unix systems, these two scripts will
allow you to allow you to
keep files in compressed format, but still let [4mless[24m keep files in compressed format, but still let [4mless[24m
view them directly: view them directly:
lessopen.sh: lessopen.sh:
#! /bin/sh #! /bin/sh
case "$1" in case "$1" in
*.Z) TEMPFILE=$(mktemp) *.Z) TEMPFILE=$(mktemp)
uncompress ‐c $1 >$TEMPFILE 2>/dev/null uncompress ‐c $1 >$TEMPFILE 2>/dev/null
if [ ‐s $TEMPFILE ]; then if [ ‐s $TEMPFILE ]; then
echo $TEMPFILE echo $TEMPFILE
else else
rm ‐f $TEMPFILE rm ‐f $TEMPFILE
fi fi
;; ;;
esac esac
lessclose.sh: lessclose.sh:
#! /bin/sh #! /bin/sh
rm $2 rm $2
To use these scripts, put them both where they can be ex- To use these scripts, put them both where they can be exe-
ecuted and set cuted and set
LESSOPEN="lessopen.sh %s", and LESSCLOSE="lessclose.sh LESSOPEN="lessopen.sh %s", and LESSCLOSE="lessclose.sh
%s %s". More %s %s". More
complex LESSOPEN and LESSCLOSE scripts may be written to complex LESSOPEN and LESSCLOSE scripts may be written to
accept other accept other
types of compressed files, and so on. types of compressed files, and so on.
It is also possible to set up an input preprocessor to It is also possible to set up an input preprocessor to
pipe the file pipe the file
data directly to [4mless[24m, rather than putting the da- data directly to [4mless[24m, rather than putting the data
ta into a replacement into a replacement
file. This avoids the need to decompress the entire file file. This avoids the need to decompress the entire file
before start‐ before start‐
ing to view it. An input preprocessor that works this way ing to view it. An input preprocessor that works this way
is called an is called an
input pipe. An input pipe, instead of writing the name of input pipe. An input pipe, instead of writing the name
a replace‐ of a replace‐
ment file on its standard output, writes the entire con- ment file on its standard output, writes the entire con-
tents of the re‐ tents of the re‐
placement file on its standard output. If the input placement file on its standard output. If the input
pipe does not pipe does not
write any characters on its standard output, then there write any characters on its standard output, then there is
is no replace‐ no replace‐
ment file and [4mless[24m uses the original file, as nor- ment file and [4mless[24m uses the original file, as nor-
mal. To use an input mal. To use an input
pipe, make the first character in the LESSOPEN environ- pipe, make the first character in the LESSOPEN environment
ment variable a variable a
vertical bar (|) to signify that the input preprocessor vertical bar (|) to signify that the input preproces-
is an input sor is an input
pipe. As with non‐pipe input preprocessors, the com- pipe. As with non‐pipe input preprocessors, the command
mand string must string must
contain one occurrence of %s, which is replaced with the contain one occurrence of %s, which is replaced with
filename of the filename of
the input file. the input file.
For example, on many Unix systems, this script will work For example, on many Unix systems, this script will work
like the pre‐ like the pre‐
vious example scripts: vious example scripts:
lesspipe.sh: lesspipe.sh:
#! /bin/sh #! /bin/sh
case "$1" in case "$1" in
*.Z) uncompress ‐c $1 2>/dev/null *.Z) uncompress ‐c $1 2>/dev/null
;; ;;
*) exit 1 *) exit 1
;; ;;
esac esac
exit $? exit $?
To use this script, put it where it can be exe- To use this script, put it where it can be exe-
cuted and set cuted and set
LESSOPEN="|lesspipe.sh %s". LESSOPEN="|lesspipe.sh %s".
Note that a preprocessor cannot output an empty file, Note that a preprocessor cannot output an empty file,
since that is in‐ since that is in‐
terpreted as meaning there is no replacement, and the terpreted as meaning there is no replacement, and the
original file is original file is
used. To avoid this, if LESSOPEN starts with two ver- used. To avoid this, if LESSOPEN starts with two verti-
tical bars, the cal bars, the
exit status of the script becomes meaningful. If the ex- exit status of the script becomes meaningful. If the
it status is exit status is
zero, the output is considered to be replacement text, zero, the output is considered to be replacement text,
even if it is even if it is
empty. If the exit status is nonzero, any output is ig- empty. If the exit status is nonzero, any output is
nored and the ignored and the
original file is used. For compatibility with previ- original file is used. For compatibility with previous
ous versions of versions of
[4mless[24m, if LESSOPEN starts with only one vertical [4mless[24m, if LESSOPEN starts with only one vertical
bar, the exit status of bar, the exit status of
the preprocessor is ignored. the preprocessor is ignored.
When an input pipe is used, a LESSCLOSE postprocessor can When an input pipe is used, a LESSCLOSE postprocessor can
be used, but be used, but
it is usually not necessary since there is no replacement it is usually not necessary since there is no replacement
file to clean file to clean
up. In this case, the replacement file name passed to up. In this case, the replacement file name passed to
the LESSCLOSE the LESSCLOSE
postprocessor is "‐". postprocessor is "‐".
For compatibility with previous versions of [4mless[24m, For compatibility with previous versions of [4mless[24m,
the input preproces‐ the input preproces‐
sor or pipe is not used if [4mless[24m is viewing standard sor or pipe is not used if [4mless[24m is viewing standard
input. However, if input. However, if
the first character of LESSOPEN is a dash (‐), the input the first character of LESSOPEN is a dash (‐), the input
preprocessor preprocessor
is used on standard input as well as other files. In is used on standard input as well as other files. In
this case, the this case, the
dash is not considered to be part of the preprocessor dash is not considered to be part of the preprocessor
command. If command. If
standard input is being viewed, the input preprocessor is standard input is being viewed, the input preprocessor is
passed a file passed a file
name consisting of a single dash. Similarly, if the first name consisting of a single dash. Similarly, if the
two charac‐ first two charac‐
ters of LESSOPEN are vertical bar and dash (|‐) or two ters of LESSOPEN are vertical bar and dash (|‐) or two
vertical bars vertical bars
and a dash (||‐), the input pipe is used on standard input and a dash (||‐), the input pipe is used on standard in-
as well as put as well as
other files. Again, in this case the dash is not consid- other files. Again, in this case the dash is not consid-
ered to be part ered to be part
of the input pipe command. of the input pipe command.
[1mNATIONAL CHARACTER SETS[0m [1mNATIONAL CHARACTER SETS[0m
There are three types of characters in the input file: There are three types of characters in the input file:
normal characters normal characters
can be displayed directly to the screen. can be displayed directly to the screen.
control characters control characters
should not be displayed directly, but are expected should not be displayed directly, but are expect-
to be found ed to be found
in ordinary text files (such as backspace and tab). in ordinary text files (such as backspace and tab).
binary characters binary characters
should not be displayed directly and are not should not be displayed directly and are not ex-
expected to be pected to be
found in text files. found in text files.
A "character set" is simply a description of which charac- A "character set" is simply a description of which charac-
ters are to be ters are to be
considered normal, control, and binary. The LESS- considered normal, control, and binary. The LESSCHARSET
CHARSET environment environment
variable may be used to select a character set. Possible variable may be used to select a character set. Possi-
values for ble values for
LESSCHARSET are: LESSCHARSET are:
ascii BS, TAB, NL, CR, and formfeed are control charac- ascii BS, TAB, NL, CR, and formfeed are control charac-
ters, all chars ters, all chars
with values between 32 and 126 are normal, and all with values between 32 and 126 are normal, and
others are all others are
binary. binary.
iso8859 iso8859
Selects an ISO 8859 character set. This is the Selects an ISO 8859 character set. This is the
same as ASCII, same as ASCII,
except characters between 160 and 255 are treat- except characters between 160 and 255 are
ed as normal treated as normal
characters. characters.
latin1 Same as iso8859. latin1 Same as iso8859.
latin9 Same as iso8859. latin9 Same as iso8859.
dos Selects a character set appropriate for MS‐DOS. dos Selects a character set appropriate for MS‐DOS.
ebcdic Selects an EBCDIC character set. ebcdic Selects an EBCDIC character set.
IBM‐1047 IBM‐1047
Selects an EBCDIC character set used by OS/390 Selects an EBCDIC character set used by OS/390
Unix Services. Unix Services.
This is the EBCDIC analogue of latin1. You get This is the EBCDIC analogue of latin1. You get
similar results similar results
by setting either LESSCHARSET=IBM‐1047 or by setting either LESSCHARSET=IBM‐1047 or
LC_CTYPE=en_US in your LC_CTYPE=en_US in your
environment. environment.
koi8‐r Selects a Russian character set. koi8‐r Selects a Russian character set.
next Selects a character set appropriate for NeXT com- next Selects a character set appropriate for NeXT com-
puters. puters.
utf‐8 Selects the UTF‐8 encoding of the ISO 10646 utf‐8 Selects the UTF‐8 encoding of the ISO 10646
character set. character set.
UTF‐8 is special in that it supports multi‐byte UTF‐8 is special in that it supports multi‐byte
characters in characters in
the input file. It is the only character set that the input file. It is the only character set that
supports mul‐ supports mul‐
ti‐byte characters. ti‐byte characters.
windows windows
Selects a character set appropriate for Micro- Selects a character set appropriate for Microsoft
soft Windows (cp Windows (cp
1251). 1251).
In rare cases, it may be desired to tailor [4mless[24m to In rare cases, it may be desired to tailor [4mless[24m to
use a character set use a character set
other than the ones definable by LESSCHARSET. In this other than the ones definable by LESSCHARSET. In this
case, the envi‐ case, the envi‐
ronment variable LESSCHARDEF can be used to define a char- ronment variable LESSCHARDEF can be used to define a char-
acter set. It acter set. It
should be set to a string where each character in the should be set to a string where each character in the
string represents string represents
one character in the character set. The character "." is one character in the character set. The character "."
used for a is used for a
normal character, "c" for control, and "b" for binary. A normal character, "c" for control, and "b" for binary. A
decimal num‐ decimal num‐
ber may be used for repetition. For example, "bccc4b." ber may be used for repetition. For example, "bc-
would mean cc4b." would mean
character 0 is binary, 1, 2 and 3 are control, 4, 5, 6 character 0 is binary, 1, 2 and 3 are control, 4, 5, 6 and
and 7 are bina‐ 7 are bina‐
ry, and 8 is normal. All characters after the last are ry, and 8 is normal. All characters after the last are
taken to be the taken to be the
same as the last, so characters 9 through 255 would be same as the last, so characters 9 through 255 would be
normal. (This normal. (This
is an example, and does not necessarily represent any is an example, and does not necessarily represent any
real character real character
set.) set.)
This table shows the value of LESSCHARDEF which is This table shows the value of LESSCHARDEF which is equiva-
equivalent to each lent to each
of the possible values for LESSCHARSET: of the possible values for LESSCHARSET:
ascii 8bcccbcc18b95.b ascii 8bcccbcc18b95.b
dos 8bcccbcc12bc5b95.b. dos 8bcccbcc12bc5b95.b.
ebcdic 5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b ebcdic 5bc6bcc7bcc41b.9b7.9b5.b..8b6.10b6.b9.7b
9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b. 9.8b8.17b3.3b9.7b9.8b8.6b10.b.b.b.
IBM‐1047 4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc IBM‐1047 4cbcbc3b9cbccbccbb4c6bcc5b3cbbc4bc4bccbc
191.b 191.b
iso8859 8bcccbcc18b95.33b. iso8859 8bcccbcc18b95.33b.
koi8‐r 8bcccbcc18b95.b128. koi8‐r 8bcccbcc18b95.b128.
latin1 8bcccbcc18b95.33b. latin1 8bcccbcc18b95.33b.
next 8bcccbcc18b95.bb125.bb next 8bcccbcc18b95.bb125.bb
If neither LESSCHARSET nor LESSCHARDEF is set, but any of If neither LESSCHARSET nor LESSCHARDEF is set, but any
the strings of the strings
"UTF‐8", "UTF8", "utf‐8" or "utf8" is found in the "UTF‐8", "UTF8", "utf‐8" or "utf8" is found in the LC_ALL,
LC_ALL, LC_CTYPE or LC_CTYPE or
LANG environment variables, then the default character set LANG environment variables, then the default character set
is utf‐8. is utf‐8.
If that string is not found, but your system supports the If that string is not found, but your system supports the
[4msetlocale[24m in‐ [4msetlocale[24m in‐
terface, [4mless[24m will use setlocale to determine the terface, [4mless[24m will use setlocale to determine the
character set. set‐ character set. set‐
locale is controlled by setting the LANG or LC_CTYPE envi- locale is controlled by setting the LANG or LC_CTYPE en-
ronment vari‐ vironment vari‐
ables. ables.
Finally, if the [4msetlocale[24m interface is also not Finally, if the [4msetlocale[24m interface is also not
available, the default available, the default
character set is latin1. character set is latin1.
Control and binary characters are displayed in Control and binary characters are displayed in
standout (reverse standout (reverse
video). Each such character is displayed in caret nota- video). Each such character is displayed in caret nota-
tion if possible tion if possible
(e.g. ^A for control‐A). Caret notation is used only if (e.g. ^A for control‐A). Caret notation is used only if
inverting the inverting the
0100 bit results in a normal printable character. Other- 0100 bit results in a normal printable character. Other-
wise, the char‐ wise, the char‐
acter is displayed as a hex number in angle brackets. acter is displayed as a hex number in angle brackets.
This format can This format can
be changed by setting the LESSBINFMT environment vari- be changed by setting the LESSBINFMT environment variable.
able. LESSBINFMT LESSBINFMT
may begin with a "*" and one character to select the dis- may begin with a "*" and one character to select the dis-
play attribute: play attribute:
"*k" is blinking, "*d" is bold, "*u" is underlined, "*s" "*k" is blinking, "*d" is bold, "*u" is underlined, "*s"
is standout, is standout,
and "*n" is normal. If LESSBINFMT does not begin with a and "*n" is normal. If LESSBINFMT does not begin with
"*", normal a "*", normal
attribute is assumed. The remainder of LESSBINFMT is a attribute is assumed. The remainder of LESSBINFMT is a
string which string which
may include one printf‐style escape sequence (a % followed may include one printf‐style escape sequence (a % fol-
by x, X, o, lowed by x, X, o,
d, etc.). For example, if LESSBINFMT is "*u[%x]", bi- d, etc.). For example, if LESSBINFMT is "*u[%x]", bina-
nary characters ry characters
are displayed in underlined hexadecimal surrounded by are displayed in underlined hexadecimal surrounded by
brackets. The brackets. The
default if no LESSBINFMT is specified is "*s<%02X>". default if no LESSBINFMT is specified is "*s<%02X>".
Warning: the re‐ Warning: the re‐
sult of expanding the character via LESSBINFMT must be sult of expanding the character via LESSBINFMT must be
less than 31 less than 31
characters. characters.
When the character set is utf‐8, the LESSUTFBINFMT envi- When the character set is utf‐8, the LESSUTFBINFMT envi-
ronment variable ronment variable
acts similarly to LESSBINFMT but it applies to Unicode acts similarly to LESSBINFMT but it applies to Unicode
code points that code points that
were successfully decoded but are unsuitable for display were successfully decoded but are unsuitable for display
(e.g., unas‐ (e.g., unas‐
signed code points). Its default value is "<U+%04lX>". signed code points). Its default value is
Note that "<U+%04lX>". Note that
LESSUTFBINFMT and LESSBINFMT share their display at- LESSUTFBINFMT and LESSBINFMT share their display at-
tribute setting tribute setting
("*x") so specifying one will affect both; LESSUTFBINFMT ("*x") so specifying one will affect both; LESSUTFBINFMT
is read after is read after
LESSBINFMT so its setting, if any, will have priority. LESSBINFMT so its setting, if any, will have priority.
Problematic Problematic
octets in a UTF‐8 file (octets of a truncated sequence, octets in a UTF‐8 file (octets of a truncated se-
octets of a quence, octets of a
complete but non‐shortest form sequence, invalid complete but non‐shortest form sequence, invalid
octets, and stray octets, and stray
trailing octets) are displayed individually using LESS- trailing octets) are displayed individually using LESS-
BINFMT so as to BINFMT so as to
facilitate diagnostic of how the UTF‐8 file is ill‐formed. facilitate diagnostic of how the UTF‐8 file is ill‐formed.
[1mPROMPTS[0m [1mPROMPTS[0m
The ‐P option allows you to tailor the prompt to your The ‐P option allows you to tailor the prompt to your
preference. The preference. The
string given to the ‐P option replaces the specified string given to the ‐P option replaces the specified
prompt string. prompt string.
Certain characters in the string are interpreted special- Certain characters in the string are interpreted special-
ly. The prompt ly. The prompt
mechanism is rather complicated to provide flexibility, mechanism is rather complicated to provide flexibility,
but the ordi‐ but the ordi‐
nary user need not understand the details of constructing nary user need not understand the details of constructing
personalized personalized
prompt strings. prompt strings.
A percent sign followed by a single character is expanded A percent sign followed by a single character is expanded
according to according to
what the following character is: what the following character is:
%b[4mX[24m Replaced by the byte offset into the cur- %b[4mX[24m Replaced by the byte offset into the current
rent input file. The b input file. The b
is followed by a single character (shown as is followed by a single character (shown as
[4mX[24m above) which spec‐ [4mX[24m above) which spec‐
ifies the line whose byte offset is to be used. ifies the line whose byte offset is to be used. If
If the charac‐ the charac‐
ter is a "t", the byte offset of the top line in ter is a "t", the byte offset of the top line in
the display is the display is
used, an "m" means use the middle line, a "b" means used, an "m" means use the middle line, a "b" means
use the bot‐ use the bot‐
tom line, a "B" means use the line just after the tom line, a "B" means use the line just after the
bottom line, bottom line,
and a "j" means use the "target" line, as speci- and a "j" means use the "target" line, as specified
fied by the ‐j by the ‐j
option. option.
%B Replaced by the size of the current input file. %B Replaced by the size of the current input file.
%c Replaced by the column number of the text appearing %c Replaced by the column number of the text appearing
in the first in the first
column of the screen. column of the screen.
%d[4mX[24m Replaced by the page number of a line in %d[4mX[24m Replaced by the page number of a line in the
the input file. The input file. The
line to be used is determined by the [4mX[24m, as line to be used is determined by the [4mX[24m, as
with the %b option. with the %b option.
%D Replaced by the number of pages in the input file, %D Replaced by the number of pages in the input
or equiva‐ file, or equiva‐
lently, the page number of the last line in the in- lently, the page number of the last line in the in-
put file. put file.
%E Replaced by the name of the editor (from the VIS- %E Replaced by the name of the editor (from the VISUAL
UAL environment environment
variable, or the EDITOR environment variable if variable, or the EDITOR environment variable if
VISUAL is not VISUAL is not
defined). See the discussion of the LESSEDIT fea- defined). See the discussion of the LESSEDIT fea-
ture below. ture below.
%f Replaced by the name of the current input file. %f Replaced by the name of the current input file.
%F Replaced by the last component of the name of the %F Replaced by the last component of the name of the
current input current input
file. file.
%g Replaced by the shell‐escaped name of the current %g Replaced by the shell‐escaped name of the cur-
input file. rent input file.
This is useful when the expanded string will be This is useful when the expanded string will be
used in a shell used in a shell
command, such as in LESSEDIT. command, such as in LESSEDIT.
%i Replaced by the index of the current file in the %i Replaced by the index of the current file in the
list of input list of input
files. files.
%l[4mX[24m Replaced by the line number of a line in %l[4mX[24m Replaced by the line number of a line in the
the input file. The input file. The
line to be used is determined by the [4mX[24m, as line to be used is determined by the [4mX[24m, as
with the %b option. with the %b option.
%L Replaced by the line number of the last line in the %L Replaced by the line number of the last line in the
input file. input file.
%m Replaced by the total number of input files. %m Replaced by the total number of input files.
%p[4mX[24m Replaced by the percent into the current in- %p[4mX[24m Replaced by the percent into the current
put file, based on input file, based on
byte offsets. The line used is determined by the byte offsets. The line used is determined by the
[4mX[24m as with the [4mX[24m as with the
%b option. %b option.
%P[4mX[24m Replaced by the percent into the current in- %P[4mX[24m Replaced by the percent into the current
put file, based on input file, based on
line numbers. The line used is determined by the line numbers. The line used is determined by the
[4mX[24m as with the [4mX[24m as with the
%b option. %b option.
%s Same as %B. %s Same as %B.
%t Causes any trailing spaces to be removed. Usually %t Causes any trailing spaces to be removed. Usual-
used at the ly used at the
end of the string, but may appear anywhere. end of the string, but may appear anywhere.
%T Normally expands to the word "file". However if %T Normally expands to the word "file". However if
viewing files viewing files
via a tags list using the ‐t option, it expands via a tags list using the ‐t option, it ex-
to the word pands to the word
"tag". "tag".
%x Replaced by the name of the next input file in the %x Replaced by the name of the next input file in the
list. list.
If any item is unknown (for example, the file size if in- If any item is unknown (for example, the file size if in-
put is a pipe), put is a pipe),
a question mark is printed instead. a question mark is printed instead.
The format of the prompt string can be changed depending The format of the prompt string can be changed depend-
on certain ing on certain
conditions. A question mark followed by a single char- conditions. A question mark followed by a single charac-
acter acts like ter acts like
an "IF": depending on the following character, a condition an "IF": depending on the following character, a condi-
is evaluat‐ tion is evaluat‐
ed. If the condition is true, any characters following ed. If the condition is true, any characters following
the question the question
mark and condition character, up to a period, are in- mark and condition character, up to a period, are
cluded in the included in the
prompt. If the condition is false, such characters are prompt. If the condition is false, such characters are
not included. not included.
A colon appearing between the question mark and the period A colon appearing between the question mark and the peri-
can be used od can be used
to establish an "ELSE": any characters between the colon to establish an "ELSE": any characters between the colon
and the period and the period
are included in the string if and only if the IF condi- are included in the string if and only if the IF condi-
tion is false. tion is false.
Condition characters (which follow a question mark) may Condition characters (which follow a question mark) may
be: be:
?a True if any characters have been included in the ?a True if any characters have been included in the
prompt so far. prompt so far.
?b[4mX[24m True if the byte offset of the specified ?b[4mX[24m True if the byte offset of the specified
line is known. line is known.
?B True if the size of current input file is known. ?B True if the size of current input file is known.
?c True if the text is horizontally shifted (%c is not ?c True if the text is horizontally shifted (%c is not
zero). zero).
?d[4mX[24m True if the page number of the specified ?d[4mX[24m True if the page number of the specified
line is known. line is known.
?e True if at end‐of‐file. ?e True if at end‐of‐file.
?f True if there is an input filename (that is, if ?f True if there is an input filename (that is, if in-
input is not a put is not a
pipe). pipe).
?l[4mX[24m True if the line number of the specified ?l[4mX[24m True if the line number of the specified
line is known. line is known.
?L True if the line number of the last line in the ?L True if the line number of the last line in the
file is known. file is known.
?m True if there is more than one input file. ?m True if there is more than one input file.
?n True if this is the first prompt in a new input ?n True if this is the first prompt in a new input
file. file.
?p[4mX[24m True if the percent into the current input ?p[4mX[24m True if the percent into the current input
file, based on byte file, based on byte
offsets, of the specified line is known. offsets, of the specified line is known.
?P[4mX[24m True if the percent into the current input ?P[4mX[24m True if the percent into the current input
file, based on line file, based on line
numbers, of the specified line is known. numbers, of the specified line is known.
?s Same as "?B". ?s Same as "?B".
?x True if there is a next input file (that is, if the ?x True if there is a next input file (that is, if
current in‐ the current in‐
put file is not the last one). put file is not the last one).
Any characters other than the special ones (question mark, Any characters other than the special ones (question mark,
colon, peri‐ colon, peri‐
od, percent, and backslash) become literally part of the od, percent, and backslash) become literally part of the
prompt. Any prompt. Any
of the special characters may be included in the prompt of the special characters may be included in the prompt
literally by literally by
preceding it with a backslash. preceding it with a backslash.
Some examples: Some examples:
?f%f:Standard input. ?f%f:Standard input.
This prompt prints the filename, if known; otherwise the This prompt prints the filename, if known; otherwise the
string "Stan‐ string "Stan‐
dard input". dard input".
?f%f .?ltLine %lt:?pt%pt:?btByte %bt:‐... ?f%f .?ltLine %lt:?pt%pt:?btByte %bt:‐...
This prompt would print the filename, if known. The This prompt would print the filename, if known. The file-
filename is fol‐ name is fol‐
lowed by the line number, if known, otherwise the per- lowed by the line number, if known, otherwise the per-
cent if known, cent if known,
otherwise the byte offset if known. Otherwise, a dash is otherwise the byte offset if known. Otherwise, a dash is
printed. No‐ printed. No‐
tice how each question mark has a matching period, and how tice how each question mark has a matching period, and
the % after how the % after
the %pt is included literally by escaping it with a back- the %pt is included literally by escaping it with a back-
slash. slash.
?n?f%f .?m(%T %i of %m) ..?e(END) ?x‐ Next %x..%t"; ?n?f%f .?m(%T %i of %m) ..?e(END) ?x‐ Next %x..%t";
This prints the filename if this is the first prompt in This prints the filename if this is the first prompt in a
a file, fol‐ file, fol‐
lowed by the "file N of N" message if there is more lowed by the "file N of N" message if there is more
than one input than one input
file. Then, if we are at end‐of‐file, the string file. Then, if we are at end‐of‐file, the string "(END)"
"(END)" is printed is printed
followed by the name of the next file, if there is one. followed by the name of the next file, if there is one.
Finally, any Finally, any
trailing spaces are truncated. This is the default trailing spaces are truncated. This is the default
prompt. For refer‐ prompt. For refer‐
ence, here are the defaults for the other two prompts (‐m ence, here are the defaults for the other two prompts
and ‐M re‐ (‐m and ‐M re‐
spectively). Each is broken into two lines here for read- spectively). Each is broken into two lines here for read-
ability only. ability only.
?n?f%f .?m(%T %i of %m) ..?e(END) ?x‐ Next %x.: ?n?f%f .?m(%T %i of %m) ..?e(END) ?x‐ Next %x.:
?pB%pB:byte %bB?s/%s...%t ?pB%pB:byte %bB?s/%s...%t
?f%f .?n?m(%T %i of %m) ..?ltlines %lt‐%lb?L/%L. : ?f%f .?n?m(%T %i of %m) ..?ltlines %lt‐%lb?L/%L. :
byte %bB?s/%s. .?e(END) ?x‐ Next %x.:?pB%pB..%t byte %bB?s/%s. .?e(END) ?x‐ Next %x.:?pB%pB..%t
And here is the default message produced by the = command: And here is the default message produced by the = command:
?f%f .?m(%T %i of %m) .?ltlines %lt‐%lb?L/%L. . ?f%f .?m(%T %i of %m) .?ltlines %lt‐%lb?L/%L. .
byte %bB?s/%s. ?e(END) :?pB%pB..%t byte %bB?s/%s. ?e(END) :?pB%pB..%t
The prompt expansion features are also used for another The prompt expansion features are also used for another
purpose: if an purpose: if an
environment variable LESSEDIT is defined, it is used as environment variable LESSEDIT is defined, it is used as
the command to the command to
be executed when the v command is invoked. The LESSEDIT be executed when the v command is invoked. The LESSEDIT
string is ex‐ string is ex‐
panded in the same way as the prompt strings. The de- panded in the same way as the prompt strings. The de-
fault value for fault value for
LESSEDIT is: LESSEDIT is:
%E ?lm+%lm. %g %E ?lm+%lm. %g
Note that this expands to the editor name, followed by a + Note that this expands to the editor name, followed by a +
and the line and the line
number, followed by the shell‐escaped file name. If your number, followed by the shell‐escaped file name. If
editor does your editor does
not accept the "+linenumber" syntax, or has other differ- not accept the "+linenumber" syntax, or has other differ-
ences in invo‐ ences in invo‐
cation syntax, the LESSEDIT variable can be changed to cation syntax, the LESSEDIT variable can be changed to
modify this de‐ modify this de‐
fault. fault.
[1mSECURITY[0m [1mSECURITY[0m
When the environment variable LESSSECURE is set to 1, When the environment variable LESSSECURE is set to 1,
[4mless[24m runs in a [4mless[24m runs in a
"secure" mode. This means these features are disabled: "secure" mode. This means these features are disabled:
! the shell command ! the shell command
| the pipe command | the pipe command
:e the examine command. :e the examine command.
v the editing command v the editing command
s ‐o log files s ‐o log files
‐k use of lesskey files ‐k use of lesskey files
‐t use of tags files ‐t use of tags files
metacharacters in filenames, such as * metacharacters in filenames, such as *
filename completion (TAB, ^L) filename completion (TAB, ^L)
Less can also be compiled to be permanently in "secure" Less can also be compiled to be permanently in "secure"
mode. mode.
[1mCOMPATIBILITY WITH MORE[0m [1mCOMPATIBILITY WITH MORE[0m
If the environment variable LESS_IS_MORE is set to 1, or If the environment variable LESS_IS_MORE is set to 1, or
if the program if the program
is invoked via a file link named "more", [4mless[24m be- is invoked via a file link named "more", [4mless[24m be-
haves (mostly) in con‐ haves (mostly) in con‐
formance with the POSIX "more" command specification. In formance with the POSIX "more" command specification.
this mode, In this mode,
less behaves differently in these ways: less behaves differently in these ways:
The ‐e option works differently. If the ‐e option is not The ‐e option works differently. If the ‐e option is not
set, [4mless[24m be‐
haves as if the ‐e option were set. If the ‐e option is
set, [4mless[24m be‐ set, [4mless[24m be‐
haves as if the ‐e option were set. If the ‐e option is
set, [4mless[24m be‐
haves as if the ‐E option were set. haves as if the ‐E option were set.
The ‐m option works differently. If the ‐m option is The ‐m option works differently. If the ‐m option is
not set, the not set, the
medium prompt is used, and it is prefixed with the string medium prompt is used, and it is prefixed with the
"‐‐More‐‐". string "‐‐More‐‐".
If the ‐m option is set, the short prompt is used. If the ‐m option is set, the short prompt is used.
The ‐n option acts like the ‐z option. The normal be- The ‐n option acts like the ‐z option. The normal behav-
havior of the ‐n ior of the ‐n
option is unavailable in this mode. option is unavailable in this mode.
The parameter to the ‐p option is taken to be a The parameter to the ‐p option is taken to be a
[4mless[24m command rather [4mless[24m command rather
than a search pattern. than a search pattern.
The LESS environment variable is ignored, and the The LESS environment variable is ignored, and the MORE
MORE environment environment
variable is used in its place. variable is used in its place.
[1mENVIRONMENT VARIABLES[0m [1mENVIRONMENT VARIABLES[0m
Environment variables may be specified either in the sys- Environment variables may be specified either in the sys-
tem environment tem environment
as usual, or in a [4mlesskey[24m(1) file. If environ- as usual, or in a [4mlesskey[24m(1) file. If environment
ment variables are de‐ variables are de‐
fined in more than one place, variables defined in a local fined in more than one place, variables defined in a local
lesskey file lesskey file
take precedence over variables defined in the system envi- take precedence over variables defined in the system envi-
ronment, which ronment, which
take precedence over variables defined in the system‐wide take precedence over variables defined in the system‐wide
lesskey file. lesskey file.
COLUMNS COLUMNS
Sets the number of columns on the screen. Takes Sets the number of columns on the screen. Takes
precedence over precedence over
the number of columns specified by the TERM vari- the number of columns specified by the TERM vari-
able. (But if able. (But if
you have a windowing system which supports you have a windowing system which supports
TIOCGWINSZ or TIOCGWINSZ or
WIOCGETD, the window system’s idea of the WIOCGETD, the window system’s idea of the screen
screen size takes size takes
precedence over the LINES and COLUMNS environment precedence over the LINES and COLUMNS environment
variables.) variables.)
EDITOR The name of the editor (used for the v command). EDITOR The name of the editor (used for the v command).
HOME Name of the user’s home directory (used to find a HOME Name of the user’s home directory (used to find a
lesskey file lesskey file
on Unix and OS/2 systems). on Unix and OS/2 systems).
HOMEDRIVE, HOMEPATH HOMEDRIVE, HOMEPATH
Concatenation of the HOMEDRIVE and HOMEPATH en- Concatenation of the HOMEDRIVE and HOMEPATH envi-
vironment vari‐ ronment vari‐
ables is the name of the user’s home directory if ables is the name of the user’s home directory if
the HOME vari‐ the HOME vari‐
able is not set (only in the Windows version). able is not set (only in the Windows version).
INIT Name of the user’s init directory (used to find a INIT Name of the user’s init directory (used to find a
lesskey file lesskey file
on OS/2 systems). on OS/2 systems).
LANG Language for determining the character set. LANG Language for determining the character set.
LC_CTYPE LC_CTYPE
Language for determining the character set. Language for determining the character set.
LESS Options which are passed to [4mless[24m automati- LESS Options which are passed to [4mless[24m automati-
cally. cally.
LESSANSIENDCHARS LESSANSIENDCHARS
Characters which may end an ANSI color escape se- Characters which may end an ANSI color escape se-
quence (default quence (default
"m"). "m").
LESSANSIMIDCHARS LESSANSIMIDCHARS
Characters which may appear between the ESC Characters which may appear between the ESC char-
character and the acter and the
end character in an ANSI color escape se- end character in an ANSI color escape se-
quence (default quence (default
"0123456789:;[?!"’#%()*+ ". "0123456789:;[?!"’#%()*+ ".
LESSBINFMT LESSBINFMT
Format for displaying non‐printable, non‐control Format for displaying non‐printable, non‐control
characters. characters.
LESSCHARDEF LESSCHARDEF
Defines a character set. Defines a character set.
LESSCHARSET LESSCHARSET
Selects a predefined character set. Selects a predefined character set.
LESSCLOSE LESSCLOSE
Command line to invoke the (optional) input‐post- Command line to invoke the (optional) input‐post-
processor. processor.
LESSECHO LESSECHO
Name of the lessecho program (default "lessecho"). Name of the lessecho program (default "lessecho").
The lessecho The lessecho
program is needed to expand metacharacters, such as program is needed to expand metacharacters, such
* and ?, in as * and ?, in
filenames on Unix systems. filenames on Unix systems.
LESSEDIT LESSEDIT
Editor prototype string (used for the v command). Editor prototype string (used for the v command).
See discus‐ See discus‐
sion under PROMPTS. sion under PROMPTS.
LESSGLOBALTAGS LESSGLOBALTAGS
Name of the command used by the ‐t option to find Name of the command used by the ‐t option to find
global tags. global tags.
Normally should be set to "global" if your system Normally should be set to "global" if your system
has the [4mglob‐[0m has the [4mglob‐[0m
[4mal[24m(1) command. If not set, global tags are [4mal[24m(1) command. If not set, global tags are
not used. not used.
LESSHISTFILE LESSHISTFILE
Name of the history file used to remember search Name of the history file used to remember search
commands and commands and
shell commands between invocations of shell commands between invocations of [4mless[24m.
[4mless[24m. If set to "‐" or If set to "‐" or
"/dev/null", a history file is not used. The "/dev/null", a history file is not used.
default is The default is
"$HOME/.lesshst" on Unix systems, "$HOME/.lesshst" on Unix systems, "$HOME/_lesshst"
"$HOME/_lesshst" on DOS and on DOS and
Windows systems, or "$HOME/lesshst.ini" or Windows systems, or "$HOME/lesshst.ini" or
"$INIT/lesshst.ini" "$INIT/lesshst.ini"
on OS/2 systems. on OS/2 systems.
LESSHISTSIZE LESSHISTSIZE
The maximum number of commands to save in the his- The maximum number of commands to save in the his-
tory file. The tory file. The
default is 100. default is 100.
LESSKEY LESSKEY
Name of the default [4mlesskey[24m(1) file. Name of the default [4mlesskey[24m(1) file.
LESSKEY_SYSTEM LESSKEY_SYSTEM
Name of the default system‐wide [4mlesskey[24m(1) Name of the default system‐wide [4mlesskey[24m(1)
file. file.
LESSMETACHARS LESSMETACHARS
List of characters which are considered "metachar- List of characters which are considered "metachar-
acters" by the acters" by the
shell. shell.
LESSMETAESCAPE LESSMETAESCAPE
Prefix which less will add before each metachar- Prefix which less will add before each metacharac-
acter in a com‐ ter in a com‐
mand sent to the shell. If LESSMETAESCAPE is an mand sent to the shell. If LESSMETAESCAPE is an
empty string, empty string,
commands containing metacharacters will not be commands containing metacharacters will not be
passed to the passed to the
shell. shell.
LESSOPEN LESSOPEN
Command line to invoke the (optional) input‐pre- Command line to invoke the (optional) input‐pre-
processor. processor.
LESSSECURE LESSSECURE
Runs less in "secure" mode. See discussion under Runs less in "secure" mode. See discussion under
SECURITY. SECURITY.
LESSSEPARATOR LESSSEPARATOR
String to be appended to a directory name in String to be appended to a directory name in
filename comple‐ filename comple‐
tion. tion.
LESSUTFBINFMT LESSUTFBINFMT
Format for displaying non‐printable Unicode code Format for displaying non‐printable Unicode code
points. points.
LESS_IS_MORE LESS_IS_MORE
Emulate the [4mmore[24m(1) command. Emulate the [4mmore[24m(1) command.
LINES Sets the number of lines on the screen. Takes LINES Sets the number of lines on the screen. Takes
precedence over precedence over
the number of lines specified by the TERM variable. the number of lines specified by the TERM variable.
(But if you (But if you
have a windowing system which supports TIOCGWINSZ have a windowing system which supports TIOCGWINSZ
or WIOCGETD, or WIOCGETD,
the window system’s idea of the screen size the window system’s idea of the screen size
takes precedence takes precedence
over the LINES and COLUMNS environment variables.) over the LINES and COLUMNS environment variables.)
MORE Options which are passed to [4mless[24m automati- MORE Options which are passed to [4mless[24m automati-
cally when running in cally when running in
[4mmore[24m compatible mode. [4mmore[24m compatible mode.
PATH User’s search path (used to find a lesskey file on PATH User’s search path (used to find a lesskey file
MS‐DOS and on MS‐DOS and
OS/2 systems). OS/2 systems).
SHELL The shell used to execute the ! command, as well SHELL The shell used to execute the ! command, as well
as to expand as to expand
filenames. filenames.
TERM The type of terminal on which [4mless[24m is being TERM The type of terminal on which [4mless[24m is being
run. run.
VISUAL The name of the editor (used for the v command). VISUAL The name of the editor (used for the v command).
[1mSEE ALSO[0m [1mSEE ALSO[0m
[1mlesskey[22m(1) [1mlesskey[22m(1)
[1mCOPYRIGHT[0m [1mCOPYRIGHT[0m
Copyright (C) 1984‐2021 Mark Nudelman Copyright (C) 1984‐2021 Mark Nudelman
less is part of the GNU project and is free software. You less is part of the GNU project and is free software.
can redis‐ You can redis‐
tribute it and/or modify it under the terms of either (1) tribute it and/or modify it under the terms of either (1)
the GNU Gen‐ the GNU Gen‐
eral Public License as published by the Free Software eral Public License as published by the Free Software
Foundation; or Foundation; or
(2) the Less License. See the file README in the less (2) the Less License. See the file README in the less
distribution for distribution for
more details regarding redistribution. You should have more details regarding redistribution. You should have
received a copy received a copy
of the GNU General Public License along with the source of the GNU General Public License along with the source
for less; see for less; see
the file COPYING. If not, write to the Free Software the file COPYING. If not, write to the Free Software
Foundation, 59 Foundation, 59
Temple Place, Suite 330, Boston, MA 02111‐1307, USA. Temple Place, Suite 330, Boston, MA 02111‐1307, USA. You
You should also should also
have received a copy of the Less License; see the file LI- have received a copy of the Less License; see the file LI-
CENSE. CENSE.
less is distributed in the hope that it will be useful, less is distributed in the hope that it will be useful,
but WITHOUT ANY but WITHOUT ANY
WARRANTY; without even the implied warranty of MER- WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FIT‐ CHANTABILITY or FIT‐
NESS FOR A PARTICULAR PURPOSE. See the GNU General Public NESS FOR A PARTICULAR PURPOSE. See the GNU General Pub-
License for lic License for
more details. more details.
[1mAUTHOR[0m [1mAUTHOR[0m
Mark Nudelman Mark Nudelman
Report bugs at https://github.com/gwsw/less/issues. Report bugs at https://github.com/gwsw/less/issues.
For more information, see the less homepage at For more information, see the less homepage at
https://greenwoodsoftware.com/less. https://greenwoodsoftware.com/less.
Version 580: 02 Mar 2021 Version 581: 06 Apr 2021
LESS(1) LESS(1)
 End of changes. 417 change blocks. 
1373 lines changed or deleted 1377 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)