[BACK]Return to less.nro CVS log [TXT][DIR] Up to [local] / src / usr.bin / less

Diff for /src/usr.bin/less/Attic/less.nro between version 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2003/04/13 18:21:21 version 1.1.1.3, 2011/09/16 17:47:06
Line 1 
Line 1 
 .TH LESS 1 "Version 381: 17 Jan 2003"  .TH LESS 1 "Version 444: 09 Jun 2011"
 .SH NAME  .SH NAME
 less \- opposite of more  less \- opposite of more
 .SH SYNOPSIS  .SH SYNOPSIS
 .B "less -?"  .B "less \-?"
 .br  .br
 .B "less --help"  .B "less \-\-help"
 .br  .br
 .B "less -V"  .B "less \-V"
 .br  .br
 .B "less --version"  .B "less \-\-version"
 .br  .br
 .B "less [-[+]aBcCdeEfFgGiIJLmMnNqQrRsSuUVwWX~]"  .B "less [\-[+]aABcCdeEfFgGiIJKLmMnNqQrRsSuUVwWX~]"
 .br  .br
 .B "     [-b \fIspace\fP] [-h \fIlines\fP] [-j \fIline\fP] [-k \fIkeyfile\fP]"  .B "     [\-b \fIspace\fP] [\-h \fIlines\fP] [\-j \fIline\fP] [\-k \fIkeyfile\fP]"
 .br  .br
 .B "     [-{oO} \fIlogfile\fP] [-p \fIpattern\fP] [-P \fIprompt\fP] [-t \fItag\fP]"  .B "     [\-{oO} \fIlogfile\fP] [\-p \fIpattern\fP] [\-P \fIprompt\fP] [\-t \fItag\fP]"
 .br  .br
 .B "     [-T \fItagsfile\fP] [-x \fItab\fP,...] [-y \fIlines\fP] [-[z] \fIlines\fP]"  .B "     [\-T \fItagsfile\fP] [\-x \fItab\fP,...] [\-y \fIlines\fP] [\-[z] \fIlines\fP]"
 .br  .br
 .B "     [-# \fIshift\fP] [+[+]\fIcmd\fP] [--] [\fIfilename\fP]..."  .B "     [\-# \fIshift\fP] [+[+]\fIcmd\fP] [\-\-] [\fIfilename\fP]..."
 .br  .br
 (See the OPTIONS section for alternate option syntax with long option names.)  (See the OPTIONS section for alternate option syntax with long option names.)
   
Line 57 
Line 57 
 Help: display a summary of these commands.  Help: display a summary of these commands.
 If you forget all the other commands, remember this one.  If you forget all the other commands, remember this one.
 .IP "SPACE or ^V or f or ^F"  .IP "SPACE or ^V or f or ^F"
 Scroll forward N lines, default one window (see option -z below).  Scroll forward N lines, default one window (see option \-z below).
 If N is more than the screen size, only the final screenful is displayed.  If N is more than the screen size, only the final screenful is displayed.
 Warning: some systems use ^V as a special literalization character.  Warning: some systems use ^V as a special literalization character.
 .IP "z"  .IP "z"
Line 65 
Line 65 
 .IP "ESC-SPACE"  .IP "ESC-SPACE"
 Like SPACE, but scrolls a full screenful, even if it reaches  Like SPACE, but scrolls a full screenful, even if it reaches
 end-of-file in the process.  end-of-file in the process.
 .IP "RETURN or ^N or e or ^E or j or ^J"  .IP "ENTER or RETURN or ^N or e or ^E or j or ^J"
 Scroll forward N lines, default 1.  Scroll forward N lines, default 1.
 The entire N lines are displayed, even if N is more than the screen size.  The entire N lines are displayed, even if N is more than the screen size.
 .IP "d or ^D"  .IP "d or ^D"
Line 73 
Line 73 
 If N is specified, it becomes the new default for  If N is specified, it becomes the new default for
 subsequent d and u commands.  subsequent d and u commands.
 .IP "b or ^B or ESC-v"  .IP "b or ^B or ESC-v"
 Scroll backward N lines, default one window (see option -z below).  Scroll backward N lines, default one window (see option \-z below).
 If N is more than the screen size, only the final screenful is displayed.  If N is more than the screen size, only the final screenful is displayed.
 .IP "w"  .IP "w"
 Like ESC-v, but if N is specified, it becomes the new window size.  Like ESC-v, but if N is specified, it becomes the new window size.
Line 87 
Line 87 
 subsequent d and u commands.  subsequent d and u commands.
 .IP "ESC-) or RIGHTARROW"  .IP "ESC-) or RIGHTARROW"
 Scroll horizontally right N characters, default half the screen width  Scroll horizontally right N characters, default half the screen width
 (see the -# option).  (see the \-# option).
 If a number N is specified, it becomes the default for future RIGHTARROW  If a number N is specified, it becomes the default for future RIGHTARROW
 and LEFTARROW commands.  and LEFTARROW commands.
 While the text is scrolled, it acts as though the -S option  While the text is scrolled, it acts as though the \-S option
 (chop lines) were in effect.  (chop lines) were in effect.
 .IP "ESC-( or LEFTARROW"  .IP "ESC-( or LEFTARROW"
 Scroll horizontally left N characters, default half the screen width  Scroll horizontally left N characters, default half the screen width
 (see the -# option).  (see the \-# option).
 If a number N is specified, it becomes the default for future RIGHTARROW  If a number N is specified, it becomes the default for future RIGHTARROW
 and LEFTARROW commands.  and LEFTARROW commands.
 .IP "r or ^R or ^L"  .IP "r or ^R or ^L"
Line 108 
Line 108 
 Normally this command would be used when already at the end of the file.  Normally this command would be used when already at the end of the file.
 It is a way to monitor the tail of a file which is growing  It is a way to monitor the tail of a file which is growing
 while it is being viewed.  while it is being viewed.
 (The behavior is similar to the "tail -f" command.)  (The behavior is similar to the "tail \-f" command.)
 .IP "g or < or ESC-<"  .IP "g or < or ESC-<"
 Go to line N in the file, default 1 (beginning of file).  Go to line N in the file, default 1 (beginning of file).
 (Warning: this may be slow if N is large.)  (Warning: this may be slow if N is large.)
Line 119 
Line 119 
 standard input, rather than a file, is being read.)  standard input, rather than a file, is being read.)
 .IP "p or %"  .IP "p or %"
 Go to a position N percent into the file.  Go to a position N percent into the file.
 N should be between 0 and 100.  N should be between 0 and 100, and may contain a decimal point.
   .IP "P"
   Go to the line containing byte offset N in the file.
 .IP "{"  .IP "{"
 If a left curly bracket appears in the top line displayed  If a left curly bracket appears in the top line displayed
 on the screen,  on the screen,
Line 175 
Line 177 
 Search forward in the file for the N-th line containing the pattern.  Search forward in the file for the N-th line containing the pattern.
 N defaults to 1.  N defaults to 1.
 The pattern is a regular expression, as recognized by  The pattern is a regular expression, as recognized by
 .I ed.  the regular expression library supplied by your system.
 The search starts at the second line displayed  The search starts at the first line displayed
 (but see the -a and -j options, which change this).  (but see the \-a and \-j options, which change this).
 .sp  .sp
 Certain characters are special  Certain characters are special
 if entered at the beginning of the pattern;  if entered at the beginning of the pattern;
Line 194 
Line 196 
 Begin the search at the first line of the FIRST file  Begin the search at the first line of the FIRST file
 in the command line list,  in the command line list,
 regardless of what is currently displayed on the screen  regardless of what is currently displayed on the screen
 or the settings of the -a or -j options.  or the settings of the \-a or \-j options.
 .IP "^K"  .IP "^K"
 Highlight any text which matches the pattern on the current screen,  Highlight any text which matches the pattern on the current screen,
 but don't move to the first match (KEEP current position).  but don't move to the first match (KEEP current position).
Line 219 
Line 221 
 Begin the search at the last line of the last file  Begin the search at the last line of the last file
 in the command line list,  in the command line list,
 regardless of what is currently displayed on the screen  regardless of what is currently displayed on the screen
 or the settings of the -a or -j options.  or the settings of the \-a or \-j options.
 .IP "^K"  .IP "^K"
 As in forward searches.  As in forward searches.
 .IP "^R"  .IP "^R"
Line 252 
Line 254 
 If highlighting is already off because of a previous ESC-u command,  If highlighting is already off because of a previous ESC-u command,
 turn highlighting back on.  turn highlighting back on.
 Any search command will also turn highlighting back on.  Any search command will also turn highlighting back on.
 (Highlighting can also be disabled by toggling the -G option;  (Highlighting can also be disabled by toggling the \-G option;
 in that case search commands do not turn highlighting back on.)  in that case search commands do not turn highlighting back on.)
   .IP "&pattern"
   Display only lines which match the pattern;
   lines which do not match the pattern are not displayed.
   If pattern is empty (if you type & immediately followed by ENTER),
   any filtering is turned off, and all lines are displayed.
   While filtering is in effect, an ampersand is displayed at the
   beginning of the prompt,
   as a reminder that some lines in the file may be hidden.
   .sp
   Certain characters are special as in the / command:
   .RS
   .IP "^N or !"
   Display only lines which do NOT match the pattern.
   .IP "^R"
   Don't interpret regular expression metacharacters;
   that is, do a simple textual comparison.
   .RE
 .IP ":e [filename]"  .IP ":e [filename]"
 Examine a new file.  Examine a new file.
 If the filename is missing, the "current" file (see the :n and :p commands  If the filename is missing, the "current" file (see the :n and :p commands
Line 272 
Line 291 
 the list of files and the first one is examined.  the list of files and the first one is examined.
 If the filename contains one or more spaces,  If the filename contains one or more spaces,
 the entire filename should be enclosed in double quotes  the entire filename should be enclosed in double quotes
 (also see the -" option).  (also see the \-" option).
 .IP "^X^V or E"  .IP "^X^V or E"
 Same as :e.  Same as :e.
 Warning: some systems use ^V as a special literalization character.  Warning: some systems use ^V as a special literalization character.
Line 306 
Line 325 
 and print a message describing the new setting.  and print a message describing the new setting.
 If a ^P (CONTROL-P) is entered immediately after the dash,  If a ^P (CONTROL-P) is entered immediately after the dash,
 the setting of the option is changed but no message is printed.  the setting of the option is changed but no message is printed.
 If the option letter has a numeric value (such as -b or -h),  If the option letter has a numeric value (such as \-b or \-h),
 or a string value (such as -P or -t),  or a string value (such as \-P or \-t),
 a new value may be entered after the option letter.  a new value may be entered after the option letter.
 If no new value is entered, a message describing  If no new value is entered, a message describing
 the current setting is printed and nothing is changed.  the current setting is printed and nothing is changed.
 .IP \-\-  .IP \-\-
 Like the \- command, but takes a long option name (see OPTIONS below)  Like the \- command, but takes a long option name (see OPTIONS below)
 rather than a single option letter.  rather than a single option letter.
 You must press RETURN after typing the option name.  You must press ENTER or RETURN after typing the option name.
 A ^P immediately after the second dash suppresses printing of a  A ^P immediately after the second dash suppresses printing of a
 message describing the new setting, as in the \- command.  message describing the new setting, as in the \- command.
 .IP \-+  .IP \-+
Line 344 
Line 363 
 (Double underscore.)  (Double underscore.)
 Like the _ (underscore) command, but takes a long option name  Like the _ (underscore) command, but takes a long option name
 rather than a single option letter.  rather than a single option letter.
 You must press RETURN after typing the option name.  You must press ENTER or RETURN after typing the option name.
 .IP +cmd  .IP +cmd
 Causes the specified cmd to be executed each time a new file is examined.  Causes the specified cmd to be executed each time a new file is examined.
 For example, +G causes  For example, +G causes
Line 401 
Line 420 
 or two dashes followed by a long option name.  or two dashes followed by a long option name.
 A long option name may be abbreviated as long as  A long option name may be abbreviated as long as
 the abbreviation is unambiguous.  the abbreviation is unambiguous.
 For example, --quit-at-eof may be abbreviated --quit, but not  For example, \-\-quit-at-eof may be abbreviated \-\-quit, but not
 --qui, since both --quit-at-eof and --quiet begin with --qui.  --qui, since both \-\-quit-at-eof and \-\-quiet begin with \-\-qui.
 Some long option names are in uppercase, such as --QUIT-AT-EOF, as  Some long option names are in uppercase, such as \-\-QUIT-AT-EOF, as
 distinct from --quit-at-eof.  distinct from \-\-quit-at-eof.
 Such option names need only have their first letter capitalized;  Such option names need only have their first letter capitalized;
 the remainder of the name may be in either case.  the remainder of the name may be in either case.
 For example, --Quit-at-eof is equivalent to --QUIT-AT-EOF.  For example, \-\-Quit-at-eof is equivalent to \-\-QUIT-AT-EOF.
 .PP  .PP
 Options are also taken from the environment variable "LESS".  Options are also taken from the environment variable "LESS".
 For example,  For example,
 to avoid typing "less -options ..." each time  to avoid typing "less \-options ..." each time
 .I less  .I less
 is invoked, you might tell  is invoked, you might tell
 .I csh:  .I csh:
Line 432 
Line 451 
 to its default value on the command line by beginning the command  to its default value on the command line by beginning the command
 line option with "\-+".  line option with "\-+".
 .sp  .sp
 For options like -P or -D which take a following string,  For options like \-P or \-D which take a following string,
 a dollar sign ($) must be used to signal the end of the string.  a dollar sign ($) must be used to signal the end of the string.
 For example, to set two -D options on MS-DOS, you must have  For example, to set two \-D options on MS-DOS, you must have
 a dollar sign between them, like this:  a dollar sign between them, like this:
 .sp  .sp
 LESS="-Dn9.1$-Ds4.1"  LESS="-Dn9.1$-Ds4.1"
 .sp  .sp
 .IP "-? or --help"  .IP "\-? or \-\-help"
 This option displays a summary of the commands accepted by  This option displays a summary of the commands accepted by
 .I less  .I less
 (the same as the h command).  (the same as the h command).
 (Depending on how your shell interprets the question mark,  (Depending on how your shell interprets the question mark,
 it may be necessary to quote the question mark, thus: "-\e?".)  it may be necessary to quote the question mark, thus: "\-\e?".)
 .IP "-a or --search-skip-screen"  .IP "\-a or \-\-search-skip-screen"
 Causes searches to start after the last line  By default, forward searches start at the top of the displayed screen
 displayed on the screen,  and backwards searches start at the bottom of the displayed screen
   (except for repeated searches invoked by the n or N commands,
   which start after or before the "target" line respectively;
   see the \-j option for more about the target line).
   The \-a option causes forward searches to instead start at
   the bottom of the screen
   and backward searches to start at the top of the screen,
 thus skipping all lines displayed on the screen.  thus skipping all lines displayed on the screen.
 By default, searches start at the second line on the screen  .IP "\-A or \-\-SEARCH-SKIP-SCREEN"
 (or after the last found line; see the -j option).  Causes all forward searches (not just non-repeated searches)
 .IP "-b\fIn\fP or --buffers=\fIn\fP"  to start just after the target line, and all backward searches
   to start just before the target line.
   Thus, forward searches will skip part of the displayed screen
   (from the first line up to and including the target line).
   Similarly backwards searches will skip the displayed screen
   from the last line up to and including the target line.
   This was the default behavior in less versions prior to 441.
   .IP "\-b\fIn\fP or \-\-buffers=\fIn\fP"
 Specifies the amount of buffer space  Specifies the amount of buffer space
 .I less  .I less
 will use for each file, in units of kilobytes (1024 bytes).  will use for each file, in units of kilobytes (1024 bytes).
 By default 64K of buffer space is used for each file  By default 64K of buffer space is used for each file
 (unless the file is a pipe; see the -B option).  (unless the file is a pipe; see the \-B option).
 The -b option specifies instead that \fIn\fP kilobytes of  The \-b option specifies instead that \fIn\fP kilobytes of
 buffer space should be used for each file.  buffer space should be used for each file.
 If \fIn\fP is -1, buffer space is unlimited; that is,  If \fIn\fP is \-1, buffer space is unlimited; that is,
 the entire file is read into memory.  the entire file can be read into memory.
 .IP "-B or --auto-buffers"  .IP "\-B or \-\-auto-buffers"
 By default, when data is read from a pipe,  By default, when data is read from a pipe,
 buffers are allocated automatically as needed.  buffers are allocated automatically as needed.
 If a large amount of data is read from the pipe, this can cause  If a large amount of data is read from the pipe, this can cause
 a large amount of memory to be allocated.  a large amount of memory to be allocated.
 The -B option disables this automatic allocation of buffers for pipes,  The \-B option disables this automatic allocation of buffers for pipes,
 so that only 64K  so that only 64K
 (or the amount of space specified by the -b option)  (or the amount of space specified by the \-b option)
 is used for the pipe.  is used for the pipe.
 Warning: use of -B can result in erroneous display, since only the  Warning: use of \-B can result in erroneous display, since only the
 most recently viewed part of the file is kept in memory;  most recently viewed part of the piped data is kept in memory;
 any earlier data is lost.  any earlier data is lost.
 .IP "-c or --clear-screen"  .IP "\-c or \-\-clear-screen"
 Causes full screen repaints to be painted from the top line down.  Causes full screen repaints to be painted from the top line down.
 By default,  By default,
 full screen repaints are done by scrolling from the bottom of the screen.  full screen repaints are done by scrolling from the bottom of the screen.
 .IP "-C or --CLEAR-SCREEN"  .IP "\-C or \-\-CLEAR-SCREEN"
 The -C option is like -c, but the screen is cleared before it is repainted.  Same as \-c, for compatibility with older versions of
 .IP "-d or --dumb"  .I less.
 The -d option suppresses the error message  .IP "\-d or \-\-dumb"
   The \-d option suppresses the error message
 normally displayed if the terminal is dumb;  normally displayed if the terminal is dumb;
 that is, lacks some important capability,  that is, lacks some important capability,
 such as the ability to clear the screen or scroll backward.  such as the ability to clear the screen or scroll backward.
 The -d option does not otherwise change the behavior of  The \-d option does not otherwise change the behavior of
 .I less  .I less
 on a dumb terminal.  on a dumb terminal.
 .IP "-D\fBx\fP\fIcolor\fP or --color=\fBx\fP\fIcolor\fP"  .IP "\-D\fBx\fP\fIcolor\fP or \-\-color=\fBx\fP\fIcolor\fP"
 [MS-DOS only]  [MS-DOS only]
 Sets the color of the text displayed.  Sets the color of the text displayed.
 \fBx\fP is a single character which selects the type of text whose color is  \fBx\fP is a single character which selects the type of text whose color is
Line 495 
Line 528 
 \fIcolor\fP is a pair of numbers separated by a period.  \fIcolor\fP is a pair of numbers separated by a period.
 The first number selects the foreground color and the second selects  The first number selects the foreground color and the second selects
 the background color of the text.  the background color of the text.
 A single number \fIN\fP is the same as \fIN.0\fP.  A single number \fIN\fP is the same as \fIN.M\fP,
 .IP "-e or --quit-at-eof"  where \fIM\fP is the normal background color.
   
   .IP "\-e or \-\-quit-at-eof"
 Causes  Causes
 .I less  .I less
 to automatically exit  to automatically exit
Line 504 
Line 539 
 By default, the only way to exit  By default, the only way to exit
 .I less  .I less
 is via the "q" command.  is via the "q" command.
 .IP "-E or --QUIT-AT-EOF"  .IP "\-E or \-\-QUIT-AT-EOF"
 Causes  Causes
 .I less  .I less
 to automatically exit the first time it reaches end-of-file.  to automatically exit the first time it reaches end-of-file.
 .IP "-f or --force"  .IP "\-f or \-\-force"
 Forces non-regular files to be opened.  Forces non-regular files to be opened.
 (A non-regular file is a directory or a device special file.)  (A non-regular file is a directory or a device special file.)
 Also suppresses the warning message when a binary file is opened.  Also suppresses the warning message when a binary file is opened.
 By default,  By default,
 .I less  .I less
 will refuse to open non-regular files.  will refuse to open non-regular files.
 .IP "-F or --quit-if-one-screen"  Note that some operating systems will not allow directories
   to be read, even if \-f is set.
   .IP "\-F or \-\-quit-if-one-screen"
 Causes  Causes
 .I less  .I less
 to automatically exit  to automatically exit
 if the entire file can be displayed on the first screen.  if the entire file can be displayed on the first screen.
 .IP "-g or --hilite-search"  .IP "\-g or \-\-hilite-search"
 Normally,  Normally,
 .I less  .I less
 will highlight ALL strings which match the last search command.  will highlight ALL strings which match the last search command.
 The -g option changes this behavior to highlight only the particular string  The \-g option changes this behavior to highlight only the particular string
 which was found by the last search command.  which was found by the last search command.
 This can cause  This can cause
 .I less  .I less
 to run somewhat faster than the default.  to run somewhat faster than the default.
 .IP "-G or --HILITE-SEARCH"  .IP "\-G or \-\-HILITE-SEARCH"
 The -G option suppresses all highlighting of strings found by search commands.  The \-G option suppresses all highlighting of strings found by search commands.
 .IP "-h\fIn\fP or ---max-back-scroll=\fIn\fP"  .IP "\-h\fIn\fP or \-\-max-back-scroll=\fIn\fP"
 Specifies a maximum number of lines to scroll backward.  Specifies a maximum number of lines to scroll backward.
 If it is necessary to scroll backward more than \fIn\fP lines,  If it is necessary to scroll backward more than \fIn\fP lines,
 the screen is repainted in a forward direction instead.  the screen is repainted in a forward direction instead.
 (If the terminal does not have the ability to scroll  (If the terminal does not have the ability to scroll
 backward, -h0 is implied.)  backward, \-h0 is implied.)
 .IP "-i or --ignore-case"  .IP "\-i or \-\-ignore-case"
 Causes searches to ignore case; that is,  Causes searches to ignore case; that is,
 uppercase and lowercase are considered identical.  uppercase and lowercase are considered identical.
 This option is ignored if any uppercase letters  This option is ignored if any uppercase letters
 appear in the search pattern;  appear in the search pattern;
 in other words,  in other words,
 if a pattern contains uppercase letters, then that search does not ignore case.  if a pattern contains uppercase letters, then that search does not ignore case.
 .IP "-I or --IGNORE-CASE"  .IP "\-I or \-\-IGNORE-CASE"
 Like -i, but searches ignore case even if  Like \-i, but searches ignore case even if
 the pattern contains uppercase letters.  the pattern contains uppercase letters.
 .IP "-j\fIn\fP or --jump-target=\fIn\fP"  .IP "\-j\fIn\fP or \-\-jump-target=\fIn\fP"
 Specifies a line on the screen where the "target" line  Specifies a line on the screen where the "target" line
 is to be positioned.  is to be positioned.
 A target line is the object of a text search,  The target line is the line specified by any command to
 tag search, jump to a line number,  search for a pattern, jump to a line number,
 jump to a file percentage, or jump to a marked position.  jump to a file percentage or jump to a tag.
 The screen line is specified by a number: the top line on the screen  The screen line may be specified by a number: the top line on the screen
 is 1, the next is 2, and so on.  is 1, the next is 2, and so on.
 The number may be negative to specify a line relative to the bottom  The number may be negative to specify a line relative to the bottom
 of the screen: the bottom line on the screen is -1, the second  of the screen: the bottom line on the screen is \-1, the second
 to the bottom is -2, and so on.  to the bottom is \-2, and so on.
 If the -j option is used, searches begin at the line immediately  Alternately, the screen line may be specified as a fraction of the height
 after the target line.  of the screen, starting with a decimal point: .5 is in the middle of the
 For example, if "-j4" is used, the target line is the  screen, .3 is three tenths down from the first line, and so on.
 fourth line on the screen, so searches begin at the fifth line  If the line is specified as a fraction, the actual line number
   is recalculated if the terminal window is resized, so that the
   target line remains at the specified fraction of the screen height.
   If any form of the \-j option is used,
   forward searches begin at the line immediately after the target line,
   and backward searches begin at the target line,
   unless changed by \-a or \-A.
   For example, if "\-j4" is used, the target line is the
   fourth line on the screen, so forward searches begin at the fifth line
 on the screen.  on the screen.
 .IP "-J or --status-column"  .IP "\-J or \-\-status-column"
 Displays a status column at the left edge of the screen.  Displays a status column at the left edge of the screen.
 The status column shows the lines that matched the current search.  The status column shows the lines that matched the current search.
 The status column is also used if the -w or -W option is in effect.  The status column is also used if the \-w or \-W option is in effect.
 .IP "-k\fIfilename\fP or --lesskey-file=\fIfilename\fP"  .IP "\-k\fIfilename\fP or \-\-lesskey-file=\fIfilename\fP"
 Causes  Causes
 .I less  .I less
 to open and interpret the named file as a  to open and interpret the named file as a
 .I lesskey  .I lesskey
 (1) file.  (1) file.
 Multiple -k options may be specified.  Multiple \-k options may be specified.
 If the LESSKEY or LESSKEY_SYSTEM environment variable is set, or  If the LESSKEY or LESSKEY_SYSTEM environment variable is set, or
 if a lesskey file is found in a standard place (see KEY BINDINGS),  if a lesskey file is found in a standard place (see KEY BINDINGS),
 it is also used as a  it is also used as a
 .I lesskey  .I lesskey
 file.  file.
 .IP "-L or --no-lessopen"  .IP "\-K or \-\-quit-on-intr"
   Causes
   .I less
   to exit immediately (with status 2)
   when an interrupt character (usually ^C) is typed.
   Normally, an interrupt character causes
   .I less
   to stop whatever it is doing and return to its command prompt.
   Note that use of this option makes it impossible to return to the
   command prompt from the "F" command.
   .IP "\-L or \-\-no-lessopen"
 Ignore the LESSOPEN environment variable  Ignore the LESSOPEN environment variable
 (see the INPUT PREPROCESSOR section below).  (see the INPUT PREPROCESSOR section below).
 This option can be set from within \fIless\fP,  This option can be set from within \fIless\fP,
 but it will apply only to files opened subsequently, not to the  but it will apply only to files opened subsequently, not to the
 file which is currently open.  file which is currently open.
 .IP "-m or --long-prompt"  .IP "\-m or \-\-long-prompt"
 Causes  Causes
 .I less  .I less
 to prompt verbosely (like \fImore\fP),  to prompt verbosely (like \fImore\fP),
Line 593 
Line 648 
 By default,  By default,
 .I less  .I less
 prompts with a colon.  prompts with a colon.
 .IP "-M or --LONG-PROMPT"  .IP "\-M or \-\-LONG-PROMPT"
 Causes  Causes
 .I less  .I less
 to prompt even more verbosely than  to prompt even more verbosely than
 .I more.  .I more.
 .IP "-n or --line-numbers"  .IP "\-n or \-\-line-numbers"
 Suppresses line numbers.  Suppresses line numbers.
 The default (to use line numbers) may cause  The default (to use line numbers) may cause
 .I less  .I less
 to run more slowly in some cases, especially with a very large input file.  to run more slowly in some cases, especially with a very large input file.
 Suppressing line numbers with the -n option will avoid this problem.  Suppressing line numbers with the \-n option will avoid this problem.
 Using line numbers means: the line number will be displayed in the verbose  Using line numbers means: the line number will be displayed in the verbose
 prompt and in the = command,  prompt and in the = command,
 and the v command will pass the current line number to the editor  and the v command will pass the current line number to the editor
 (see also the discussion of LESSEDIT in PROMPTS below).  (see also the discussion of LESSEDIT in PROMPTS below).
 .IP "-N or --LINE-NUMBERS"  .IP "\-N or \-\-LINE-NUMBERS"
 Causes a line number to be displayed at the beginning of  Causes a line number to be displayed at the beginning of
 each line in the display.  each line in the display.
 .IP "-o\fIfilename\fP or --log-file=\fIfilename\fP"  .IP "\-o\fIfilename\fP or \-\-log-file=\fIfilename\fP"
 Causes  Causes
 .I less  .I less
 to copy its input to the named file as it is being viewed.  to copy its input to the named file as it is being viewed.
Line 620 
Line 675 
 If the file already exists,  If the file already exists,
 .I less  .I less
 will ask for confirmation before overwriting it.  will ask for confirmation before overwriting it.
 .IP "-O\fIfilename\fP or --LOG-FILE=\fIfilename\fP"  .IP "\-O\fIfilename\fP or \-\-LOG-FILE=\fIfilename\fP"
 The -O option is like -o, but it will overwrite an existing  The \-O option is like \-o, but it will overwrite an existing
 file without asking for confirmation.  file without asking for confirmation.
 .sp  .sp
 If no log file has been specified,  If no log file has been specified,
 the -o and -O options can be used from within  the \-o and \-O options can be used from within
 .I less  .I less
 to specify a log file.  to specify a log file.
 Without a file name, they will simply report the name of the log file.  Without a file name, they will simply report the name of the log file.
 The "s" command is equivalent to specifying -o from within  The "s" command is equivalent to specifying \-o from within
 .I less.  .I less.
 .IP "-p\fIpattern\fP or --pattern=\fIpattern\fP"  .IP "\-p\fIpattern\fP or \-\-pattern=\fIpattern\fP"
 The -p option on the command line is equivalent to  The \-p option on the command line is equivalent to
 specifying +/\fIpattern\fP;  specifying +/\fIpattern\fP;
 that is, it tells  that is, it tells
 .I less  .I less
 to start at the first occurrence of \fIpattern\fP in the file.  to start at the first occurrence of \fIpattern\fP in the file.
 .IP "-P\fIprompt\fP or --prompt=\fIprompt\fP"  .IP "\-P\fIprompt\fP or \-\-prompt=\fIprompt\fP"
 Provides a way to tailor the three prompt  Provides a way to tailor the three prompt
 styles to your own preference.  styles to your own preference.
 This option would normally be put in the LESS environment  This option would normally be put in the LESS environment
Line 648 
Line 703 
 or be terminated by a dollar sign.  or be terminated by a dollar sign.
 -Ps followed by a string changes the default (short) prompt  -Ps followed by a string changes the default (short) prompt
 to that string.  to 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 data (in the F command).  -Pw changes the message printed while waiting for data (in the F command).
 All prompt strings consist of a sequence of  All prompt strings consist of a sequence of
 letters and special escape sequences.  letters and special escape sequences.
 See the section on PROMPTS for more details.  See the section on PROMPTS for more details.
 .IP "-q or --quiet or --silent"  .IP "\-q or \-\-quiet or \-\-silent"
 Causes moderately "quiet" operation:  Causes moderately "quiet" operation:
 the terminal bell is not rung  the terminal bell is not rung
 if an attempt is made to scroll past the end of the file  if an attempt is made to scroll past the end of the file
Line 665 
Line 720 
 The bell will be rung on certain other errors,  The bell will be rung on certain other errors,
 such as typing an invalid character.  such as typing an invalid character.
 The default is to ring the terminal bell in all such cases.  The default is to ring the terminal bell in all such cases.
 .IP "-Q or --QUIET or --SILENT"  .IP "\-Q or \-\-QUIET or \-\-SILENT"
 Causes totally "quiet" operation:  Causes totally "quiet" operation:
 the terminal bell is never rung.  the terminal bell is never rung.
 .IP "-r or --raw-control-chars"  .IP "\-r or \-\-raw-control-chars"
 Causes "raw" control characters to be displayed.  Causes "raw" control characters to be displayed.
 The default is to display control characters using the caret notation;  The default is to display control characters using the caret notation;
 for example, a control-A (octal 001) is displayed as "^A".  for example, a control-A (octal 001) is displayed as "^A".
 Warning: when the -r option is used,  Warning: when the \-r option is used,
 .I less  .I less
 cannot keep track of the actual appearance of the screen  cannot keep track of the actual appearance of the screen
 (since this depends on how the screen responds to  (since this depends on how the screen responds to
 each type of control character).  each type of control character).
 Thus, various display problems may result,  Thus, various display problems may result,
 such as long lines being split in the wrong place.  such as long lines being split in the wrong place.
 .IP "-R or --RAW-CONTROL-CHARS"  .IP "\-R or \-\-RAW-CONTROL-CHARS"
 Like -r, but tries to keep track of the screen appearance where possible.  Like \-r, but only ANSI "color" escape sequences are output in "raw" form.
 This works only if the input consists of normal text and possibly some  Unlike \-r, the screen appearance is maintained correctly in most cases.
 ANSI "color" escape sequences, which are sequences of the form:  ANSI "color" escape sequences are sequences of the form:
 .sp  .sp
         ESC [ ... m          ESC [ ... m
 .sp  .sp
 where the "..." is zero or more characters other than "m".  where the "..." is zero or more color specification characters
 For the purpose of keeping track of screen appearance,  For the purpose of keeping track of screen appearance,
 all control characters and all ANSI color escape sequences are  ANSI color escape sequences are assumed to not move the cursor.
 assumed to not move the cursor.  
 You can make  You can make
 .I less  .I less
 think that characters other than "m" can end ANSI color escape sequences  think that characters other than "m" can end ANSI color escape sequences
 by setting the environment variable LESSANSIENDCHARS to the list of  by setting the environment variable LESSANSIENDCHARS to the list of
 characters which can end a color escape sequence.  characters which can end a color escape sequence.
 .IP "-s or --squeeze-blank-lines"  And you can make
   .I less
   think that characters other than the standard ones may appear between
   the ESC and the m by setting the environment variable LESSANSIMIDCHARS
   to the list of characters which can appear.
   .IP "\-s or \-\-squeeze-blank-lines"
 Causes consecutive blank lines to be squeezed into a single blank line.  Causes consecutive blank lines to be squeezed into a single blank line.
 This is useful when viewing  This is useful when viewing
 .I nroff  .I nroff
 output.  output.
 .IP "-S or --chop-long-lines"  .IP "\-S or \-\-chop-long-lines"
 Causes lines longer than the screen width to be  Causes lines longer than the screen width to be
 chopped rather than folded.  chopped rather than folded.
 That is, the portion of a long line that does not fit in  That is, the portion of a long line that does not fit in
 the screen width is not shown.  the screen width is not shown.
 The default is to fold long lines; that is, display the remainder  The default is to fold long lines; that is, display the remainder
 on the next line.  on the next line.
 .IP "-t\fItag\fP or --tag=\fItag\fP"  .IP "\-t\fItag\fP or \-\-tag=\fItag\fP"
 The -t option, followed immediately by a TAG,  The \-t option, followed immediately by a TAG,
 will edit the file containing that tag.  will edit the file containing that tag.
 For this to work, tag information must be available;  For this to work, tag information must be available;
 for example, there may be a file in the current directory called "tags",  for example, there may be a file in the current directory called "tags",
Line 720 
Line 779 
 .I global  .I global
 (1), and that command is executed to find the tag.  (1), and that command is executed to find the tag.
 (See http://www.gnu.org/software/global/global.html).  (See http://www.gnu.org/software/global/global.html).
 The -t option may also be specified from within  The \-t option may also be specified from within
 .I less  .I less
 (using the \- command) as a way of examining a new file.  (using the \- command) as a way of examining a new file.
 The command ":t" is equivalent to specifying -t from within  The command ":t" is equivalent to specifying \-t from within
 .I less.  .I less.
 .IP "-T\fItagsfile\fP or --tag-file=\fItagsfile\fP"  .IP "\-T\fItagsfile\fP or \-\-tag-file=\fItagsfile\fP"
 Specifies a tags file to be used instead of "tags".  Specifies a tags file to be used instead of "tags".
 .IP "-u or --underline-special"  .IP "\-u or \-\-underline-special"
 Causes backspaces and carriage returns to be treated as printable characters;  Causes backspaces and carriage returns to be treated as printable characters;
 that is, they are sent to the terminal when they appear in the input.  that is, they are sent to the terminal when they appear in the input.
 .IP "-U or --UNDERLINE-SPECIAL"  .IP "\-U or \-\-UNDERLINE-SPECIAL"
 Causes backspaces, tabs and carriage returns to be  Causes backspaces, tabs and carriage returns to be
 treated as control characters;  treated as control characters;
 that is, they are handled as specified by the -r option.  that is, they are handled as specified by the \-r option.
 .sp  .sp
 By default, if neither -u nor -U is given,  By default, if neither \-u nor \-U is given,
 backspaces which appear adjacent to an underscore character  backspaces which appear adjacent to an underscore character
 are treated specially:  are treated specially:
 the underlined text is displayed  the underlined text is displayed
Line 746 
Line 805 
 using the terminal's hardware boldface capability.  using the terminal's hardware boldface capability.
 Other backspaces are deleted, along with the preceding character.  Other backspaces are deleted, along with the preceding character.
 Carriage returns immediately followed by a newline are deleted.  Carriage returns immediately followed by a newline are deleted.
 other carriage returns are handled as specified by the -r option.  other carriage returns are handled as specified by the \-r option.
 Text which is overstruck or underlined can be searched for  Text which is overstruck or underlined can be searched for
 if neither -u nor -U is in effect.  if neither \-u nor \-U is in effect.
 .IP "-V or --version"  .IP "\-V or \-\-version"
 Displays the version number of  Displays the version number of
 .I less.  .I less.
 .IP "-w or --hilite-unread"  .IP "\-w or \-\-hilite-unread"
 Temporarily highlights the first "new" line after a forward movement  Temporarily highlights the first "new" line after a forward movement
 of a full page.  of a full page.
 The first "new" line is the line immediately following the line previously  The first "new" line is the line immediately following the line previously
 at the bottom of the screen.  at the bottom of the screen.
 Also highlights the target line after a g or p command.  Also highlights the target line after a g or p command.
 The highlight is removed at the next command which causes movement.  The highlight is removed at the next command which causes movement.
 The entire line is highlighted, unless the -J option is in effect,  The entire line is highlighted, unless the \-J option is in effect,
 in which case only the status column is highlighted.  in which case only the status column is highlighted.
 .IP "-W or --HILITE-UNREAD"  .IP "\-W or \-\-HILITE-UNREAD"
 Like -w, but temporarily highlights the first new line after any  Like \-w, but temporarily highlights the first new line after any
 forward movement command larger than one line.  forward movement command larger than one line.
 .IP "-x\fIn\fP,... or --tabs=\fIn\fP,..."  .IP "\-x\fIn\fP,... or \-\-tabs=\fIn\fP,..."
 Sets tab stops.  Sets tab stops.
 If only one \fIn\fP is specified, tab stops are set at multiples of \fIn\fP.  If only one \fIn\fP is specified, tab stops are set at multiples of \fIn\fP.
 If multiple values separated by commas are specified, tab stops  If multiple values separated by commas are specified, tab stops
Line 772 
Line 831 
 last two.  last two.
 For example, \fI-x9,17\fP will set tabs at positions 9, 17, 25, 33, etc.  For example, \fI-x9,17\fP will set tabs at positions 9, 17, 25, 33, etc.
 The default for \fIn\fP is 8.  The default for \fIn\fP is 8.
 .IP "-X or --no-init"  .IP "\-X or \-\-no-init"
 Disables sending the termcap initialization and deinitialization strings  Disables sending the termcap initialization and deinitialization strings
 to the terminal.  to the terminal.
 This is sometimes desirable if the deinitialization string does  This is sometimes desirable if the deinitialization string does
 something unnecessary, like clearing the screen.  something unnecessary, like clearing the screen.
 .IP "--no-keypad"  .IP "\-y\fIn\fP or \-\-max-forw-scroll=\fIn\fP"
 Disables sending the keypad initialization and deinitialization strings  
 to the terminal.  
 This is sometimes useful if the keypad strings make the numeric  
 keypad behave in an undesirable manner.  
 .IP "-y\fIn\fP or --max-forw-scroll=\fIn\fP"  
 Specifies a maximum number of lines to scroll forward.  Specifies a maximum number of lines to scroll forward.
 If it is necessary to scroll forward more than \fIn\fP lines,  If it is necessary to scroll forward more than \fIn\fP lines,
 the screen is repainted instead.  the screen is repainted instead.
 The -c or -C option may be used to repaint from the top of  The \-c or \-C option may be used to repaint from the top of
 the screen if desired.  the screen if desired.
 By default, any forward movement causes scrolling.  By default, any forward movement causes scrolling.
 .IP "-[z]\fIn\fP or --window=\fIn\fP"  .IP "\-[z]\fIn\fP or \-\-window=\fIn\fP"
 Changes the default scrolling window size to \fIn\fP lines.  Changes the default scrolling window size to \fIn\fP lines.
 The default is one screenful.  The default is one screenful.
 The z and w commands can also be used to change the window size.  The z and w commands can also be used to change the window size.
 The "z" may be omitted for compatibility with  The "z" may be omitted for compatibility with some versions of
 .I more.  .I more.
 If the number  If the number
 .I n  .I n
 is negative, it indicates  is negative, it indicates
 .I n  .I n
 lines less than the current screen size.  lines less than the current screen size.
 For example, if the screen is 24 lines, \fI-z-4\fP sets the  For example, if the screen is 24 lines, \fI\-z-4\fP sets the
 scrolling window to 20 lines.  If the screen is resized to 40 lines,  scrolling window to 20 lines.  If the screen is resized to 40 lines,
 the scrolling window automatically changes to 36 lines.  the scrolling window automatically changes to 36 lines.
 .IP "-\fI\(dqcc\fP\ or\ --quotes=\fIcc\fP"  .IP "\-\fI\(dqcc\fP\ or\ \-\-quotes=\fIcc\fP"
 Changes the filename quoting character.  Changes the filename quoting character.
 This may be necessary if you are trying to name a file  This may be necessary if you are trying to name a file
 which contains both spaces and quote characters.  which contains both spaces and quote characters.
Line 816 
Line 870 
 Filenames containing a space should then be preceded by the open quote  Filenames containing a space should then be preceded by the open quote
 character and followed by the close quote character.  character and followed by the close quote character.
 Note that even after the quote characters are changed, this option  Note that even after the quote characters are changed, this option
 remains -" (a dash followed by a double quote).  remains \-" (a dash followed by a double quote).
 .IP "-~ or --tilde"  .IP "\-~ or \-\-tilde"
 Normally lines after end of file are displayed as a single tilde (~).  Normally lines after end of file are displayed as a single tilde (~).
 This option causes lines after end of file to be displayed as blank lines.  This option causes lines after end of file to be displayed as blank lines.
 .IP "-# or --shift"  .IP "\-# or \-\-shift"
 Specifies the default number of positions to scroll horizontally  Specifies the default number of positions to scroll horizontally
 in the RIGHTARROW and LEFTARROW commands.  in the RIGHTARROW and LEFTARROW commands.
 If the number specified is zero, it sets the default number of  If the number specified is zero, it sets the default number of
 positions to one half of the screen width.  positions to one half of the screen width.
 .IP --  Alternately, the number may be specified as a fraction of the width
 A command line argument of "--" marks the end of option arguments.  of the screen, starting with a decimal point: .5 is half of the
   screen width, .3 is three tenths of the screen width, and so on.
   If the number is specified as a fraction, the actual number of
   scroll positions is recalculated if the terminal window is resized,
   so that the actual scroll remains at the specified fraction
   of the screen width.
   .IP "\-\-no-keypad"
   Disables sending the keypad initialization and deinitialization strings
   to the terminal.
   This is sometimes useful if the keypad strings make the numeric
   keypad behave in an undesirable manner.
   .IP "\-\-follow-name"
   Normally, if the input file is renamed while an F command is executing,
   .I less
   will continue to display the contents of the original file despite
   its name change.
   If \-\-follow-name is specified, during an F command
   .I less
   will periodically attempt to reopen the file by name.
   If the reopen succeeds and the file is a different file from the original
   (which means that a new file has been created
   with the same name as the original (now renamed) file),
   .I less
   will display the contents of that new file.
   .IP \-\-
   A command line argument of "\-\-" marks the end of option arguments.
 Any arguments following this are interpreted as filenames.  Any arguments following this are interpreted as filenames.
 This can be useful when viewing a file whose name begins with a "-" or "+".  This can be useful when viewing a file whose name begins with a "\-" or "+".
 .IP +  .IP +
 If a command line option begins with \fB+\fP,  If a command line option begins with \fB+\fP,
 the remainder of that option is taken to be an initial command to  the remainder of that option is taken to be an initial command to
Line 852 
Line 931 
 certain keys can be used to manipulate the command line.  certain keys can be used to manipulate the command line.
 Most commands have an alternate form in [ brackets ] which can be used if  Most commands have an alternate form in [ brackets ] which can be used if
 a key does not exist on a particular keyboard.  a key does not exist on a particular keyboard.
 (The bracketed forms do not work in the MS-DOS version.)  (Note that the forms beginning with ESC do not work
   in some MS-DOS and Windows systems because ESC is the line erase character.)
 Any of these special keys may be entered literally by preceding  Any of these special keys may be entered literally by preceding
 it with the "literal" character, either ^V or ^A.  it with the "literal" character, either ^V or ^A.
 A backslash itself may also be entered literally by entering two backslashes.  A backslash itself may also be entered literally by entering two backslashes.
Line 905 
Line 985 
 or cancel the command if the command line is empty.  or cancel the command if the command line is empty.
 If you have changed your line-kill character in Unix to something  If you have changed your line-kill character in Unix to something
 other than ^U, that character is used instead of ^U.  other than ^U, that character is used instead of ^U.
   .IP "^G"
   Delete the entire command line and return to the main prompt.
   
 .SH "KEY BINDINGS"  .SH "KEY BINDINGS"
 You may define your own  You may define your own
Line 1019 
Line 1101 
 .br  .br
         case "$1" in          case "$1" in
 .br  .br
         *.Z)    uncompress -c $1  >/tmp/less.$$  2>/dev/null          *.Z)    uncompress -\c $1  >/tmp/less.$$  2>/dev/null
 .br  .br
                 if [ -s /tmp/less.$$ ]; then                  if [ \-s /tmp/less.$$ ]; then
 .br  .br
                         echo /tmp/less.$$                          echo /tmp/less.$$
 .br  .br
                 else                  else
 .br  .br
                         rm -f /tmp/less.$$                          rm \-f /tmp/less.$$
 .br  .br
                 fi                  fi
 .br  .br
Line 1074 
Line 1156 
 .br  .br
         case "$1" in          case "$1" in
 .br  .br
         *.Z)    uncompress -c $1  2>/dev/null          *.Z)    uncompress \-c $1  2>/dev/null
 .br  .br
                 ;;                  ;;
 .br  .br
Line 1087 
Line 1169 
 but it is usually not necessary since there is no replacement file  but it is usually not necessary since there is no replacement file
 to clean up.  to clean up.
 In this case, the replacement file name passed to the LESSCLOSE  In this case, the replacement file name passed to the LESSCLOSE
 postprocessor is "-".  postprocessor is "\-".
   .PP
   For compatibility with previous versions of
   .I less,
   the input preprocessor or pipe is not used if
   .I less
   is viewing standard input.
   However, if the first character of LESSOPEN is a dash (\-),
   the input preprocessor is used on standard input as well as other files.
   In this case, the dash is not considered to be part of
   the preprocessor command.
   If standard input is being viewed, the input preprocessor is passed
   a file name consisting of a single dash.
   Similarly, if the first two characters of LESSOPEN are vertical bar and dash
   (|\-), the input pipe is used on standard input as well as other files.
   Again, in this case the dash is not considered to be part of
   the input pipe command.
   
 .SH "NATIONAL CHARACTER SETS"  .SH "NATIONAL CHARACTER SETS"
 There are three types of characters in the input file:  There are three types of characters in the input file:
Line 1131 
Line 1229 
 Selects a character set appropriate for NeXT computers.  Selects a character set appropriate for NeXT computers.
 .IP utf-8  .IP utf-8
 Selects the UTF-8 encoding of the ISO 10646 character set.  Selects the UTF-8 encoding of the ISO 10646 character set.
   UTF-8 is special in that it supports multi-byte characters in the input file.
   It is the only character set that supports multi-byte characters.
   .IP windows
   Selects a character set appropriate for Microsoft Windows (cp 1251).
 .PP  .PP
 In special cases, it may be desired to tailor  In rare cases, it may be desired to tailor
 .I less  .I less
 to use a character set other than the ones definable by LESSCHARSET.  to use a character set other than the ones definable by LESSCHARSET.
 In this case, the environment variable LESSCHARDEF can be used  In this case, the environment variable LESSCHARDEF can be used
Line 1173 
Line 1275 
         next\ \         8bcccbcc18b95.bb125.bb          next\ \         8bcccbcc18b95.bb125.bb
 .PP  .PP
 If neither LESSCHARSET nor LESSCHARDEF is set,  If neither LESSCHARSET nor LESSCHARDEF is set,
 but the string "UTF-8" is found in the LC_ALL, LC_TYPE or LANG  but any of the strings "UTF-8", "UTF8", "utf-8" or "utf8"
   is found in the LC_ALL, LC_CTYPE or LANG
 environment variables, then the default character set is utf-8.  environment variables, then the default character set is utf-8.
 .PP  .PP
 If that string is not found, but your system supports the  If that string is not found, but your system supports the
Line 1204 
Line 1307 
 printf-style escape sequence (a % followed by x, X, o, d, etc.).  printf-style escape sequence (a % followed by x, X, o, d, etc.).
 For example, if LESSBINFMT is "*u[%x]", binary characters  For example, if LESSBINFMT is "*u[%x]", binary characters
 are displayed in underlined hexadecimal surrounded by brackets.  are displayed in underlined hexadecimal surrounded by brackets.
 The default if no LESSBINFMT is specified is "*s<%X>".  The default if no LESSBINFMT is specified is "*s<%02X>".
   Warning: the result of expanding the character via LESSBINFMT must
   be less than 31 characters.
   .PP
   When the character set is utf-8, the LESSUTFBINFMT environment variable
   acts similarly to LESSBINFMT but it applies to Unicode code points
   that were successfully decoded but are unsuitable for display (e.g.,
   unassigned code points).
   Its default value is "<U+%04lX>".
   Note that LESSUTFBINFMT and LESSBINFMT share their display attribute
   setting ("*x") so specifying one will affect both;
   LESSUTFBINFMT is read after LESSBINFMT so its setting, if any,
   will have priority.
   Problematic octets in a UTF-8 file (octets of a truncated sequence,
   octets of a complete but non-shortest form sequence, illegal octets,
   and stray trailing octets)
   are displayed individually using LESSBINFMT so as to facilitate diagnostic
   of how the UTF-8 file is ill-formed.
   
 .SH "PROMPTS"  .SH "PROMPTS"
 The -P option allows you to tailor the prompt to your preference.  The \-P option allows you to tailor the prompt to your preference.
 The string given to the -P option replaces the specified prompt string.  The string given to the \-P option replaces the specified prompt string.
 Certain characters in the string are interpreted specially.  Certain characters in the string are interpreted specially.
 The prompt mechanism is rather complicated to provide flexibility,  The prompt mechanism is rather complicated to provide flexibility,
 but the ordinary user need not understand the details of constructing  but the ordinary user need not understand the details of constructing
Line 1225 
Line 1345 
 an "m" means use the middle line,  an "m" means use the middle line,
 a "b" means use the bottom line,  a "b" means use the bottom line,
 a "B" means use the line just after the bottom line,  a "B" means use the line just after the bottom line,
 and a "j" means use the "target" line, as specified by the -j option.  and a "j" means use the "target" line, as specified by the \-j option.
 .IP "%B"  .IP "%B"
 Replaced by the size of the current input file.  Replaced by the size of the current input file.
 .IP "%c"  .IP "%c"
Line 1243 
Line 1363 
 See the discussion of the LESSEDIT feature below.  See the discussion of the LESSEDIT feature below.
 .IP "%f"  .IP "%f"
 Replaced by the name of the current input file.  Replaced by the name of the current input file.
   .IP "%F"
   Replaced by the last component of the name of the current input file.
 .IP "%i"  .IP "%i"
 Replaced by the index of the current file in the list of  Replaced by the index of the current file in the list of
 input files.  input files.
Line 1350 
Line 1472 
 Finally, any trailing spaces are truncated.  Finally, any trailing spaces are truncated.
 This is the default prompt.  This is the default prompt.
 For reference, here are the defaults for  For reference, here are the defaults for
 the other two prompts (-m and -M respectively).  the other two prompts (\-m and \-M respectively).
 Each is broken into two lines here for readability only.  Each is broken into two lines here for readability only.
 .nf  .nf
 .sp  .sp
Line 1398 
Line 1520 
 the examine command.  the examine command.
 .IP "v"  .IP "v"
 the editing command  the editing command
 .IP "s  -o"  .IP "s  \-o"
 log files  log files
 .IP "-k"  .IP "\-k"
 use of lesskey files  use of lesskey files
 .IP "-t"  .IP "\-t"
 use of tags files  use of tags files
 .IP " "  .IP " "
 metacharacters in filenames, such as *  metacharacters in filenames, such as *
Line 1412 
Line 1534 
 .PP  .PP
 Less can also be compiled to be permanently in "secure" mode.  Less can also be compiled to be permanently in "secure" mode.
   
   .SH "COMPATIBILITY WITH MORE"
   If the environment variable LESS_IS_MORE is set to 1,
   or if the program is invoked via a file link named "more",
   .I less
   behaves (mostly) in conformance with the POSIX "more" command specification.
   In this mode, less behaves differently in these ways:
   .PP
   The \-e option works differently.
   If the \-e option is not set,
   .I less
   behaves as if the \-E option were set.
   If the \-e option is set,
   .I less
   behaves as if the \-e and \-F options were set.
   .PP
   The \-m option works differently.
   If the \-m option is not set, the medium prompt is used,
   and it is prefixed with the string "--More--".
   If the \-m option is set, the short prompt is used.
   .PP
   The \-n option acts like the \-z option.
   The normal behavior of the \-n option is unavailable in this mode.
   .PP
   The parameter to the \-p option is taken to be a
   .I less
   command rather than a search pattern.
   .PP
   The LESS environment variable is ignored,
   and the MORE environment variable is used in its place.
   
 .SH "ENVIRONMENT VARIABLES"  .SH "ENVIRONMENT VARIABLES"
 Environment variables may be specified either in the system environment  Environment variables may be specified either in the system environment
 as usual, or in a  as usual, or in a
Line 1447 
Line 1599 
 .I less  .I less
 automatically.  automatically.
 .IP LESSANSIENDCHARS  .IP LESSANSIENDCHARS
 Characters which are assumed to end an ANSI color escape sequence  Characters which may end an ANSI color escape sequence
 (default "m").  (default "m").
   .IP LESSANSIMIDCHARS
   Characters which may appear between the ESC character and the
   end character in an ANSI color escape sequence
   (default "0123456789;[?!"'#%()*+\ ".
 .IP LESSBINFMT  .IP LESSBINFMT
 Format for displaying non-printable, non-control characters.  Format for displaying non-printable, non-control characters.
 .IP LESSCHARDEF  .IP LESSCHARDEF
Line 1465 
Line 1621 
 Editor prototype string (used for the v command).  Editor prototype string (used for the v command).
 See discussion under PROMPTS.  See discussion under PROMPTS.
 .IP LESSGLOBALTAGS  .IP LESSGLOBALTAGS
 Name of the command used by the -t option to find global tags.  Name of the command used by the \-t option to find global tags.
 Normally should be set to "global" if your system has the  Normally should be set to "global" if your system has the
 .I global  .I global
 (1) command.  If not set, global tags are not used.  (1) command.  If not set, global tags are not used.
   .IP LESSHISTFILE
   Name of the history file used to remember search commands and
   shell commands between invocations of
   .I less.
   If set to "\-" or "/dev/null", a history file is not used.
   The default is "$HOME/.lesshst" on Unix systems, "$HOME/_lesshst" on
   DOS and Windows systems, or "$HOME/lesshst.ini" or "$INIT/lesshst.ini"
   on OS/2 systems.
   .IP LESSHISTSIZE
   The maximum number of commands to save in the history file.
   The default is 100.
 .IP LESSKEY  .IP LESSKEY
 Name of the default lesskey(1) file.  Name of the default lesskey(1) file.
 .IP LESSKEY_SYSTEM  .IP LESSKEY_SYSTEM
Line 1487 
Line 1654 
 See discussion under SECURITY.  See discussion under SECURITY.
 .IP LESSSEPARATOR  .IP LESSSEPARATOR
 String to be appended to a directory name in filename completion.  String to be appended to a directory name in filename completion.
   .IP LESSUTFBINFMT
   Format for displaying non-printable Unicode code points.
   .IP LESS_IS_MORE
   Emulate the
   .I more
   (1) command.
 .IP LINES  .IP LINES
 Sets the number of lines on the screen.  Sets the number of lines on the screen.
 Takes precedence over the number of lines specified by the TERM variable.  Takes precedence over the number of lines specified by the TERM variable.
Line 1508 
Line 1681 
 .SH "SEE ALSO"  .SH "SEE ALSO"
 lesskey(1)  lesskey(1)
   
 .SH WARNINGS  
 The = command and prompts (unless changed by -P)  
 report the line numbers of the lines at the top and bottom of the screen,  
 but the byte and percent of the line after the one at the bottom of the screen.  
 .PP  
 If the :e command is used to name more than one file,  
 and one of the named files has been viewed previously,  
 the new files may be entered into the list in an unexpected order.  
 .PP  
 On certain older terminals (the so-called "magic cookie" terminals),  
 search highlighting will cause an erroneous display.  
 On such terminals, search highlighting is disabled by default  
 to avoid possible problems.  
 .PP  
 In certain cases, when search highlighting is enabled and  
 a search pattern begins with a ^,  
 more text than the matching string may be highlighted.  
 (This problem does not occur when less is compiled to use the POSIX  
 regular expression package.)  
 .PP  
 When viewing text containing ANSI color escape sequences using the -R option,  
 searching will not find text containing an embedded escape sequence.  
 Also, search highlighting may change the color of some of the text  
 which follows the highlighted text.  
 .PP  
 On some systems,  
 .I setlocale  
 claims that ASCII characters 0 thru 31 are control characters  
 rather than binary characters.  
 This causes  
 .I less  
 to treat some binary files as ordinary, non-binary files.  
 To workaround this problem, set the environment variable  
 LESSCHARSET to "ascii" (or whatever character set is appropriate).  
 .PP  
 See http://www.greenwoodsoftware.com/less for the latest list of known bugs in this  
 version of less.  
   
 .SH COPYRIGHT  .SH COPYRIGHT
 Copyright (C) 2002  Mark Nudelman  Copyright (C) 1984-2011  Mark Nudelman
 .PP  .PP
 less is part of the GNU project and is free software.  less is part of the GNU project and is free software.
 You can redistribute it and/or modify it  You can redistribute it and/or modify it
Line 1574 
Line 1709 
 .br  .br
 Send bug reports or comments to the above address or to bug-less@gnu.org.  Send bug reports or comments to the above address or to bug-less@gnu.org.
 .br  .br
 For more information, see the less homepage at http://www.greenwoodsoftware.com/less.  See http://www.greenwoodsoftware.com/less/bugs.html for the latest list of known bugs in less.
   .br
   For more information, see the less homepage at
   .br
   http://www.greenwoodsoftware.com/less.

Legend:
Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3