=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/Attic/less.nro,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -c -r1.1.1.2 -r1.1.1.3 *** src/usr.bin/less/Attic/less.nro 2003/04/13 18:21:21 1.1.1.2 --- src/usr.bin/less/Attic/less.nro 2011/09/16 17:47:06 1.1.1.3 *************** *** 1,24 **** ! .TH LESS 1 "Version 381: 17 Jan 2003" .SH NAME less \- opposite of more .SH SYNOPSIS ! .B "less -?" .br ! .B "less --help" .br ! .B "less -V" .br ! .B "less --version" .br ! .B "less [-[+]aBcCdeEfFgGiIJLmMnNqQrRsSuUVwWX~]" .br ! .B " [-b \fIspace\fP] [-h \fIlines\fP] [-j \fIline\fP] [-k \fIkeyfile\fP]" .br ! .B " [-{oO} \fIlogfile\fP] [-p \fIpattern\fP] [-P \fIprompt\fP] [-t \fItag\fP]" .br ! .B " [-T \fItagsfile\fP] [-x \fItab\fP,...] [-y \fIlines\fP] [-[z] \fIlines\fP]" .br ! .B " [-# \fIshift\fP] [+[+]\fIcmd\fP] [--] [\fIfilename\fP]..." .br (See the OPTIONS section for alternate option syntax with long option names.) --- 1,24 ---- ! .TH LESS 1 "Version 444: 09 Jun 2011" .SH NAME less \- opposite of more .SH SYNOPSIS ! .B "less \-?" .br ! .B "less \-\-help" .br ! .B "less \-V" .br ! .B "less \-\-version" .br ! .B "less [\-[+]aABcCdeEfFgGiIJKLmMnNqQrRsSuUVwWX~]" .br ! .B " [\-b \fIspace\fP] [\-h \fIlines\fP] [\-j \fIline\fP] [\-k \fIkeyfile\fP]" .br ! .B " [\-{oO} \fIlogfile\fP] [\-p \fIpattern\fP] [\-P \fIprompt\fP] [\-t \fItag\fP]" .br ! .B " [\-T \fItagsfile\fP] [\-x \fItab\fP,...] [\-y \fIlines\fP] [\-[z] \fIlines\fP]" .br ! .B " [\-# \fIshift\fP] [+[+]\fIcmd\fP] [\-\-] [\fIfilename\fP]..." .br (See the OPTIONS section for alternate option syntax with long option names.) *************** *** 57,63 **** Help: display a summary of these commands. If you forget all the other commands, remember this one. .IP "SPACE or ^V or f or ^F" ! 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. Warning: some systems use ^V as a special literalization character. .IP "z" --- 57,63 ---- Help: display a summary of these commands. If you forget all the other commands, remember this one. .IP "SPACE or ^V or f or ^F" ! 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. Warning: some systems use ^V as a special literalization character. .IP "z" *************** *** 65,71 **** .IP "ESC-SPACE" Like SPACE, but scrolls a full screenful, even if it reaches end-of-file in the process. ! .IP "RETURN or ^N or e or ^E or j or ^J" Scroll forward N lines, default 1. The entire N lines are displayed, even if N is more than the screen size. .IP "d or ^D" --- 65,71 ---- .IP "ESC-SPACE" Like SPACE, but scrolls a full screenful, even if it reaches end-of-file in the process. ! .IP "ENTER or RETURN or ^N or e or ^E or j or ^J" Scroll forward N lines, default 1. The entire N lines are displayed, even if N is more than the screen size. .IP "d or ^D" *************** *** 73,79 **** If N is specified, it becomes the new default for subsequent d and u commands. .IP "b or ^B or ESC-v" ! 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. .IP "w" Like ESC-v, but if N is specified, it becomes the new window size. --- 73,79 ---- If N is specified, it becomes the new default for subsequent d and u commands. .IP "b or ^B or ESC-v" ! 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. .IP "w" Like ESC-v, but if N is specified, it becomes the new window size. *************** *** 87,100 **** subsequent d and u commands. .IP "ESC-) or RIGHTARROW" Scroll horizontally right N characters, default half the screen width ! (see the -# option). If a number N is specified, it becomes the default for future RIGHTARROW and LEFTARROW commands. ! While the text is scrolled, it acts as though the -S option (chop lines) were in effect. .IP "ESC-( or LEFTARROW" Scroll horizontally left N characters, default half the screen width ! (see the -# option). If a number N is specified, it becomes the default for future RIGHTARROW and LEFTARROW commands. .IP "r or ^R or ^L" --- 87,100 ---- subsequent d and u commands. .IP "ESC-) or RIGHTARROW" Scroll horizontally right N characters, default half the screen width ! (see the \-# option). If a number N is specified, it becomes the default for future RIGHTARROW and LEFTARROW commands. ! While the text is scrolled, it acts as though the \-S option (chop lines) were in effect. .IP "ESC-( or LEFTARROW" Scroll horizontally left N characters, default half the screen width ! (see the \-# option). If a number N is specified, it becomes the default for future RIGHTARROW and LEFTARROW commands. .IP "r or ^R or ^L" *************** *** 108,114 **** 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 while it is being viewed. ! (The behavior is similar to the "tail -f" command.) .IP "g or < or ESC-<" Go to line N in the file, default 1 (beginning of file). (Warning: this may be slow if N is large.) --- 108,114 ---- 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 while it is being viewed. ! (The behavior is similar to the "tail \-f" command.) .IP "g or < or ESC-<" Go to line N in the file, default 1 (beginning of file). (Warning: this may be slow if N is large.) *************** *** 119,125 **** standard input, rather than a file, is being read.) .IP "p or %" Go to a position N percent into the file. ! N should be between 0 and 100. .IP "{" If a left curly bracket appears in the top line displayed on the screen, --- 119,127 ---- standard input, rather than a file, is being read.) .IP "p or %" Go to a position N percent into the file. ! 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 "{" If a left curly bracket appears in the top line displayed on the screen, *************** *** 175,183 **** Search forward in the file for the N-th line containing the pattern. N defaults to 1. The pattern is a regular expression, as recognized by ! .I ed. ! The search starts at the second line displayed ! (but see the -a and -j options, which change this). .sp Certain characters are special if entered at the beginning of the pattern; --- 177,185 ---- Search forward in the file for the N-th line containing the pattern. N defaults to 1. The pattern is a regular expression, as recognized by ! the regular expression library supplied by your system. ! The search starts at the first line displayed ! (but see the \-a and \-j options, which change this). .sp Certain characters are special if entered at the beginning of the pattern; *************** *** 194,200 **** Begin the search at the first line of the FIRST file in the command line list, regardless of what is currently displayed on the screen ! or the settings of the -a or -j options. .IP "^K" Highlight any text which matches the pattern on the current screen, but don't move to the first match (KEEP current position). --- 196,202 ---- Begin the search at the first line of the FIRST file in the command line list, regardless of what is currently displayed on the screen ! or the settings of the \-a or \-j options. .IP "^K" Highlight any text which matches the pattern on the current screen, but don't move to the first match (KEEP current position). *************** *** 219,225 **** Begin the search at the last line of the last file in the command line list, regardless of what is currently displayed on the screen ! or the settings of the -a or -j options. .IP "^K" As in forward searches. .IP "^R" --- 221,227 ---- Begin the search at the last line of the last file in the command line list, regardless of what is currently displayed on the screen ! or the settings of the \-a or \-j options. .IP "^K" As in forward searches. .IP "^R" *************** *** 252,259 **** If highlighting is already off because of a previous ESC-u command, turn highlighting back on. Any search command will also turn highlighting back on. ! (Highlighting can also be disabled by toggling the -G option; in that case search commands do not turn highlighting back on.) .IP ":e [filename]" Examine a new file. If the filename is missing, the "current" file (see the :n and :p commands --- 254,278 ---- If highlighting is already off because of a previous ESC-u command, turn highlighting back on. Any search command will also turn highlighting back on. ! (Highlighting can also be disabled by toggling the \-G option; 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]" Examine a new file. If the filename is missing, the "current" file (see the :n and :p commands *************** *** 272,278 **** the list of files and the first one is examined. If the filename contains one or more spaces, the entire filename should be enclosed in double quotes ! (also see the -" option). .IP "^X^V or E" Same as :e. Warning: some systems use ^V as a special literalization character. --- 291,297 ---- the list of files and the first one is examined. If the filename contains one or more spaces, the entire filename should be enclosed in double quotes ! (also see the \-" option). .IP "^X^V or E" Same as :e. Warning: some systems use ^V as a special literalization character. *************** *** 306,320 **** and print a message describing the new setting. If a ^P (CONTROL-P) is entered immediately after the dash, 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), ! or a string value (such as -P or -t), a new value may be entered after the option letter. If no new value is entered, a message describing the current setting is printed and nothing is changed. .IP \-\- Like the \- command, but takes a long option name (see OPTIONS below) rather than a single option letter. ! You must press RETURN after typing the option name. A ^P immediately after the second dash suppresses printing of a message describing the new setting, as in the \- command. .IP \-+ --- 325,339 ---- and print a message describing the new setting. If a ^P (CONTROL-P) is entered immediately after the dash, 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), ! or a string value (such as \-P or \-t), a new value may be entered after the option letter. If no new value is entered, a message describing the current setting is printed and nothing is changed. .IP \-\- Like the \- command, but takes a long option name (see OPTIONS below) rather than a single option letter. ! You must press ENTER or RETURN after typing the option name. A ^P immediately after the second dash suppresses printing of a message describing the new setting, as in the \- command. .IP \-+ *************** *** 344,350 **** (Double underscore.) Like the _ (underscore) command, but takes a long option name rather than a single option letter. ! You must press RETURN after typing the option name. .IP +cmd Causes the specified cmd to be executed each time a new file is examined. For example, +G causes --- 363,369 ---- (Double underscore.) Like the _ (underscore) command, but takes a long option name rather than a single option letter. ! You must press ENTER or RETURN after typing the option name. .IP +cmd Causes the specified cmd to be executed each time a new file is examined. For example, +G causes *************** *** 401,417 **** or two dashes followed by a long option name. A long option name may be abbreviated as long as the abbreviation is unambiguous. ! For example, --quit-at-eof may be abbreviated --quit, but not ! --qui, since both --quit-at-eof and --quiet begin with --qui. ! Some long option names are in uppercase, such as --QUIT-AT-EOF, as ! distinct from --quit-at-eof. Such option names need only have their first letter capitalized; the remainder of the name may be in either case. ! For example, --Quit-at-eof is equivalent to --QUIT-AT-EOF. .PP Options are also taken from the environment variable "LESS". For example, ! to avoid typing "less -options ..." each time .I less is invoked, you might tell .I csh: --- 420,436 ---- or two dashes followed by a long option name. A long option name may be abbreviated as long as the abbreviation is unambiguous. ! For example, \-\-quit-at-eof may be abbreviated \-\-quit, but not ! --qui, since both \-\-quit-at-eof and \-\-quiet begin with \-\-qui. ! Some long option names are in uppercase, such as \-\-QUIT-AT-EOF, as ! distinct from \-\-quit-at-eof. Such option names need only have their first letter capitalized; the remainder of the name may be in either case. ! For example, \-\-Quit-at-eof is equivalent to \-\-QUIT-AT-EOF. .PP Options are also taken from the environment variable "LESS". For example, ! to avoid typing "less \-options ..." each time .I less is invoked, you might tell .I csh: *************** *** 432,493 **** to its default value on the command line by beginning the command line option with "\-+". .sp ! For options like -P or -D which take a following 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 a dollar sign between them, like this: .sp LESS="-Dn9.1$-Ds4.1" .sp ! .IP "-? or --help" This option displays a summary of the commands accepted by .I less (the same as the h command). (Depending on how your shell interprets the question mark, ! it may be necessary to quote the question mark, thus: "-\e?".) ! .IP "-a or --search-skip-screen" ! Causes searches to start after the last line ! displayed on the screen, thus skipping all lines displayed on the screen. ! By default, searches start at the second line on the screen ! (or after the last found line; see the -j option). ! .IP "-b\fIn\fP or --buffers=\fIn\fP" Specifies the amount of buffer space .I less will use for each file, in units of kilobytes (1024 bytes). By default 64K of buffer space is used for each file ! (unless the file is a pipe; see the -B option). ! The -b option specifies instead that \fIn\fP kilobytes of buffer space should be used for each file. ! If \fIn\fP is -1, buffer space is unlimited; that is, ! the entire file is read into memory. ! .IP "-B or --auto-buffers" By default, when data is read from a pipe, buffers are allocated automatically as needed. If a large amount of data is read from the pipe, this can cause a large amount of memory to be allocated. ! The -B option disables this automatic allocation of buffers for pipes, so that only 64K ! (or the amount of space specified by the -b option) is used for the pipe. ! Warning: use of -B can result in erroneous display, since only the ! most recently viewed part of the file is kept in memory; any earlier data is lost. ! .IP "-c or --clear-screen" Causes full screen repaints to be painted from the top line down. By default, full screen repaints are done by scrolling from the bottom of the screen. ! .IP "-C or --CLEAR-SCREEN" ! The -C option is like -c, but the screen is cleared before it is repainted. ! .IP "-d or --dumb" ! The -d option suppresses the error message normally displayed if the terminal is dumb; that is, lacks some important capability, such as the ability to clear the screen or scroll backward. ! The -d option does not otherwise change the behavior of .I less on a dumb terminal. ! .IP "-D\fBx\fP\fIcolor\fP or --color=\fBx\fP\fIcolor\fP" [MS-DOS only] Sets the color of the text displayed. \fBx\fP is a single character which selects the type of text whose color is --- 451,526 ---- to its default value on the command line by beginning the command line option with "\-+". .sp ! For options like \-P or \-D which take a following 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 a dollar sign between them, like this: .sp LESS="-Dn9.1$-Ds4.1" .sp ! .IP "\-? or \-\-help" This option displays a summary of the commands accepted by .I less (the same as the h command). (Depending on how your shell interprets the question mark, ! it may be necessary to quote the question mark, thus: "\-\e?".) ! .IP "\-a or \-\-search-skip-screen" ! By default, forward searches start at the top of the displayed 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. ! .IP "\-A or \-\-SEARCH-SKIP-SCREEN" ! Causes all forward searches (not just non-repeated searches) ! 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 .I less will use for each file, in units of kilobytes (1024 bytes). By default 64K of buffer space is used for each file ! (unless the file is a pipe; see the \-B option). ! The \-b option specifies instead that \fIn\fP kilobytes of buffer space should be used for each file. ! If \fIn\fP is \-1, buffer space is unlimited; that is, ! the entire file can be read into memory. ! .IP "\-B or \-\-auto-buffers" By default, when data is read from a pipe, buffers are allocated automatically as needed. If a large amount of data is read from the pipe, this can cause a large amount of memory to be allocated. ! The \-B option disables this automatic allocation of buffers for pipes, so that only 64K ! (or the amount of space specified by the \-b option) is used for the pipe. ! Warning: use of \-B can result in erroneous display, since only the ! most recently viewed part of the piped data is kept in memory; any earlier data is lost. ! .IP "\-c or \-\-clear-screen" Causes full screen repaints to be painted from the top line down. By default, full screen repaints are done by scrolling from the bottom of the screen. ! .IP "\-C or \-\-CLEAR-SCREEN" ! Same as \-c, for compatibility with older versions of ! .I less. ! .IP "\-d or \-\-dumb" ! The \-d option suppresses the error message normally displayed if the terminal is dumb; that is, lacks some important capability, such as the ability to clear the screen or scroll backward. ! The \-d option does not otherwise change the behavior of .I less on a dumb terminal. ! .IP "\-D\fBx\fP\fIcolor\fP or \-\-color=\fBx\fP\fIcolor\fP" [MS-DOS only] Sets the color of the text displayed. \fBx\fP is a single character which selects the type of text whose color is *************** *** 495,502 **** \fIcolor\fP is a pair of numbers separated by a period. The first number selects the foreground color and the second selects the background color of the text. ! A single number \fIN\fP is the same as \fIN.0\fP. ! .IP "-e or --quit-at-eof" Causes .I less to automatically exit --- 528,537 ---- \fIcolor\fP is a pair of numbers separated by a period. The first number selects the foreground color and the second selects the background color of the text. ! A single number \fIN\fP is the same as \fIN.M\fP, ! where \fIM\fP is the normal background color. ! ! .IP "\-e or \-\-quit-at-eof" Causes .I less to automatically exit *************** *** 504,591 **** By default, the only way to exit .I less is via the "q" command. ! .IP "-E or --QUIT-AT-EOF" Causes .I less to automatically exit the first time it reaches end-of-file. ! .IP "-f or --force" Forces non-regular files to be opened. (A non-regular file is a directory or a device special file.) Also suppresses the warning message when a binary file is opened. By default, .I less will refuse to open non-regular files. ! .IP "-F or --quit-if-one-screen" Causes .I less to automatically exit if the entire file can be displayed on the first screen. ! .IP "-g or --hilite-search" Normally, .I less will highlight ALL strings which match the last search command. ! The -g option changes this behavior to highlight only the particular string which was found by the last search command. This can cause .I less to run somewhat faster than the default. ! .IP "-G or --HILITE-SEARCH" ! The -G option suppresses all highlighting of strings found by search commands. ! .IP "-h\fIn\fP or ---max-back-scroll=\fIn\fP" Specifies a maximum number of lines to scroll backward. If it is necessary to scroll backward more than \fIn\fP lines, the screen is repainted in a forward direction instead. (If the terminal does not have the ability to scroll ! backward, -h0 is implied.) ! .IP "-i or --ignore-case" Causes searches to ignore case; that is, uppercase and lowercase are considered identical. This option is ignored if any uppercase letters appear in the search pattern; in other words, if a pattern contains uppercase letters, then that search does not ignore case. ! .IP "-I or --IGNORE-CASE" ! Like -i, but searches ignore case even if the pattern contains uppercase letters. ! .IP "-j\fIn\fP or --jump-target=\fIn\fP" Specifies a line on the screen where the "target" line is to be positioned. ! A target line is the object of a text search, ! tag search, jump to a line number, ! jump to a file percentage, or jump to a marked position. ! The screen line is specified by a number: the top line on the screen is 1, the next is 2, and so on. 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 ! to the bottom is -2, and so on. ! If the -j option is used, searches begin at the line immediately ! after the target line. ! For example, if "-j4" is used, the target line is the ! fourth line on the screen, so searches begin at the fifth line on the screen. ! .IP "-J or --status-column" 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 is also used if the -w or -W option is in effect. ! .IP "-k\fIfilename\fP or --lesskey-file=\fIfilename\fP" Causes .I less to open and interpret the named file as a .I lesskey (1) file. ! Multiple -k options may be specified. If the LESSKEY or LESSKEY_SYSTEM environment variable is set, or if a lesskey file is found in a standard place (see KEY BINDINGS), it is also used as a .I lesskey file. ! .IP "-L or --no-lessopen" Ignore the LESSOPEN environment variable (see the INPUT PREPROCESSOR section below). This option can be set from within \fIless\fP, but it will apply only to files opened subsequently, not to the file which is currently open. ! .IP "-m or --long-prompt" Causes .I less to prompt verbosely (like \fImore\fP), --- 539,646 ---- By default, the only way to exit .I less is via the "q" command. ! .IP "\-E or \-\-QUIT-AT-EOF" Causes .I less to automatically exit the first time it reaches end-of-file. ! .IP "\-f or \-\-force" Forces non-regular files to be opened. (A non-regular file is a directory or a device special file.) Also suppresses the warning message when a binary file is opened. By default, .I less will refuse to open non-regular files. ! 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 .I less to automatically exit if the entire file can be displayed on the first screen. ! .IP "\-g or \-\-hilite-search" Normally, .I less will highlight ALL strings which match the last search command. ! The \-g option changes this behavior to highlight only the particular string which was found by the last search command. This can cause .I less to run somewhat faster than the default. ! .IP "\-G or \-\-HILITE-SEARCH" ! The \-G option suppresses all highlighting of strings found by search commands. ! .IP "\-h\fIn\fP or \-\-max-back-scroll=\fIn\fP" Specifies a maximum number of lines to scroll backward. If it is necessary to scroll backward more than \fIn\fP lines, the screen is repainted in a forward direction instead. (If the terminal does not have the ability to scroll ! backward, \-h0 is implied.) ! .IP "\-i or \-\-ignore-case" Causes searches to ignore case; that is, uppercase and lowercase are considered identical. This option is ignored if any uppercase letters appear in the search pattern; in other words, if a pattern contains uppercase letters, then that search does not ignore case. ! .IP "\-I or \-\-IGNORE-CASE" ! Like \-i, but searches ignore case even if the pattern contains uppercase letters. ! .IP "\-j\fIn\fP or \-\-jump-target=\fIn\fP" Specifies a line on the screen where the "target" line is to be positioned. ! The target line is the line specified by any command to ! search for a pattern, jump to a line number, ! jump to a file percentage or jump to a tag. ! The screen line may be specified by a number: the top line on the screen is 1, the next is 2, and so on. 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 ! to the bottom is \-2, and so on. ! Alternately, the screen line may be specified as a fraction of the height ! of the screen, starting with a decimal point: .5 is in the middle of the ! screen, .3 is three tenths down from the first line, and so on. ! 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. ! .IP "\-J or \-\-status-column" 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 is also used if the \-w or \-W option is in effect. ! .IP "\-k\fIfilename\fP or \-\-lesskey-file=\fIfilename\fP" Causes .I less to open and interpret the named file as a .I lesskey (1) file. ! Multiple \-k options may be specified. If the LESSKEY or LESSKEY_SYSTEM environment variable is set, or if a lesskey file is found in a standard place (see KEY BINDINGS), it is also used as a .I lesskey file. ! .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 (see the INPUT PREPROCESSOR section below). This option can be set from within \fIless\fP, but it will apply only to files opened subsequently, not to the file which is currently open. ! .IP "\-m or \-\-long-prompt" Causes .I less to prompt verbosely (like \fImore\fP), *************** *** 593,617 **** By default, .I less prompts with a colon. ! .IP "-M or --LONG-PROMPT" Causes .I less to prompt even more verbosely than .I more. ! .IP "-n or --line-numbers" Suppresses line numbers. The default (to use line numbers) may cause .I less 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. Using line numbers means: the line number will be displayed in the verbose prompt and in the = command, and the v command will pass the current line number to the editor (see also the discussion of LESSEDIT in PROMPTS below). ! .IP "-N or --LINE-NUMBERS" Causes a line number to be displayed at the beginning of each line in the display. ! .IP "-o\fIfilename\fP or --log-file=\fIfilename\fP" Causes .I less to copy its input to the named file as it is being viewed. --- 648,672 ---- By default, .I less prompts with a colon. ! .IP "\-M or \-\-LONG-PROMPT" Causes .I less to prompt even more verbosely than .I more. ! .IP "\-n or \-\-line-numbers" Suppresses line numbers. The default (to use line numbers) may cause .I less 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. Using line numbers means: the line number will be displayed in the verbose prompt and in the = command, and the v command will pass the current line number to the editor (see also the discussion of LESSEDIT in PROMPTS below). ! .IP "\-N or \-\-LINE-NUMBERS" Causes a line number to be displayed at the beginning of each line in the display. ! .IP "\-o\fIfilename\fP or \-\-log-file=\fIfilename\fP" Causes .I less to copy its input to the named file as it is being viewed. *************** *** 620,643 **** If the file already exists, .I less will ask for confirmation before overwriting it. ! .IP "-O\fIfilename\fP or --LOG-FILE=\fIfilename\fP" ! The -O option is like -o, but it will overwrite an existing file without asking for confirmation. .sp If no log file has been specified, ! the -o and -O options can be used from within .I less to specify a 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 .I less. ! .IP "-p\fIpattern\fP or --pattern=\fIpattern\fP" ! The -p option on the command line is equivalent to specifying +/\fIpattern\fP; that is, it tells .I less to start at the first occurrence of \fIpattern\fP in the file. ! .IP "-P\fIprompt\fP or --prompt=\fIprompt\fP" Provides a way to tailor the three prompt styles to your own preference. This option would normally be put in the LESS environment --- 675,698 ---- If the file already exists, .I less will ask for confirmation before overwriting it. ! .IP "\-O\fIfilename\fP or \-\-LOG-FILE=\fIfilename\fP" ! The \-O option is like \-o, but it will overwrite an existing file without asking for confirmation. .sp If no log file has been specified, ! the \-o and \-O options can be used from within .I less to specify a 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 .I less. ! .IP "\-p\fIpattern\fP or \-\-pattern=\fIpattern\fP" ! The \-p option on the command line is equivalent to specifying +/\fIpattern\fP; that is, it tells .I less to start at the first occurrence of \fIpattern\fP in the file. ! .IP "\-P\fIprompt\fP or \-\-prompt=\fIprompt\fP" Provides a way to tailor the three prompt styles to your own preference. This option would normally be put in the LESS environment *************** *** 648,662 **** or be terminated by a dollar sign. -Ps followed by a string changes the default (short) prompt to that string. ! -Pm changes the medium (-m) prompt. ! -PM changes the long (-M) prompt. -Ph changes the prompt for the help screen. -P= changes the message printed by the = command. -Pw changes the message printed while waiting for data (in the F command). All prompt strings consist of a sequence of letters and special escape sequences. See the section on PROMPTS for more details. ! .IP "-q or --quiet or --silent" Causes moderately "quiet" operation: the terminal bell is not rung if an attempt is made to scroll past the end of the file --- 703,717 ---- or be terminated by a dollar sign. -Ps followed by a string changes the default (short) prompt to that string. ! -Pm changes the medium (\-m) prompt. ! -PM changes the long (\-M) prompt. -Ph changes the prompt for the help screen. -P= changes the message printed by the = command. -Pw changes the message printed while waiting for data (in the F command). All prompt strings consist of a sequence of letters and special escape sequences. See the section on PROMPTS for more details. ! .IP "\-q or \-\-quiet or \-\-silent" Causes moderately "quiet" operation: the terminal bell is not rung if an attempt is made to scroll past the end of the file *************** *** 665,714 **** The bell will be rung on certain other errors, such as typing an invalid character. The default is to ring the terminal bell in all such cases. ! .IP "-Q or --QUIET or --SILENT" Causes totally "quiet" operation: the terminal bell is never rung. ! .IP "-r or --raw-control-chars" Causes "raw" control characters to be displayed. The default is to display control characters using the caret notation; for example, a control-A (octal 001) is displayed as "^A". ! Warning: when the -r option is used, .I less cannot keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of control character). Thus, various display problems may result, such as long lines being split in the wrong place. ! .IP "-R or --RAW-CONTROL-CHARS" ! Like -r, but tries to keep track of the screen appearance where possible. ! This works only if the input consists of normal text and possibly some ! ANSI "color" escape sequences, which are sequences of the form: .sp ESC [ ... m .sp ! where the "..." is zero or more characters other than "m". For the purpose of keeping track of screen appearance, ! all control characters and all ANSI color escape sequences are ! assumed to not move the cursor. You can make .I less think that characters other than "m" can end ANSI color escape sequences by setting the environment variable LESSANSIENDCHARS to the list of characters which can end a color escape sequence. ! .IP "-s or --squeeze-blank-lines" Causes consecutive blank lines to be squeezed into a single blank line. This is useful when viewing .I nroff output. ! .IP "-S or --chop-long-lines" Causes lines longer than the screen width to be chopped rather than folded. That is, the portion of a long line that does not fit in the screen width is not shown. The default is to fold long lines; that is, display the remainder on the next line. ! .IP "-t\fItag\fP or --tag=\fItag\fP" ! The -t option, followed immediately by a TAG, will edit the file containing that tag. For this to work, tag information must be available; for example, there may be a file in the current directory called "tags", --- 720,773 ---- The bell will be rung on certain other errors, such as typing an invalid character. The default is to ring the terminal bell in all such cases. ! .IP "\-Q or \-\-QUIET or \-\-SILENT" Causes totally "quiet" operation: the terminal bell is never rung. ! .IP "\-r or \-\-raw-control-chars" Causes "raw" control characters to be displayed. The default is to display control characters using the caret notation; for example, a control-A (octal 001) is displayed as "^A". ! Warning: when the \-r option is used, .I less cannot keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of control character). Thus, various display problems may result, such as long lines being split in the wrong place. ! .IP "\-R or \-\-RAW-CONTROL-CHARS" ! Like \-r, but only ANSI "color" escape sequences are output in "raw" form. ! Unlike \-r, the screen appearance is maintained correctly in most cases. ! ANSI "color" escape sequences are sequences of the form: .sp ESC [ ... m .sp ! where the "..." is zero or more color specification characters For the purpose of keeping track of screen appearance, ! ANSI color escape sequences are assumed to not move the cursor. You can make .I less think that characters other than "m" can end ANSI color escape sequences by setting the environment variable LESSANSIENDCHARS to the list of characters which can end a color escape sequence. ! 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. This is useful when viewing .I nroff output. ! .IP "\-S or \-\-chop-long-lines" Causes lines longer than the screen width to be chopped rather than folded. That is, the portion of a long line that does not fit in the screen width is not shown. The default is to fold long lines; that is, display the remainder on the next line. ! .IP "\-t\fItag\fP or \-\-tag=\fItag\fP" ! The \-t option, followed immediately by a TAG, will edit the file containing that tag. For this to work, tag information must be available; for example, there may be a file in the current directory called "tags", *************** *** 720,741 **** .I global (1), and that command is executed to find the tag. (See http://www.gnu.org/software/global/global.html). ! The -t option may also be specified from within .I less (using the \- command) as a way of examining a new file. ! The command ":t" is equivalent to specifying -t from within .I less. ! .IP "-T\fItagsfile\fP or --tag-file=\fItagsfile\fP" Specifies a tags file to be used instead of "tags". ! .IP "-u or --underline-special" 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. ! .IP "-U or --UNDERLINE-SPECIAL" Causes backspaces, tabs and carriage returns to be treated as control characters; ! that is, they are handled as specified by the -r option. .sp ! By default, if neither -u nor -U is given, backspaces which appear adjacent to an underscore character are treated specially: the underlined text is displayed --- 779,800 ---- .I global (1), and that command is executed to find the tag. (See http://www.gnu.org/software/global/global.html). ! The \-t option may also be specified from within .I less (using the \- command) as a way of examining a new file. ! The command ":t" is equivalent to specifying \-t from within .I less. ! .IP "\-T\fItagsfile\fP or \-\-tag-file=\fItagsfile\fP" Specifies a tags file to be used instead of "tags". ! .IP "\-u or \-\-underline-special" 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. ! .IP "\-U or \-\-UNDERLINE-SPECIAL" Causes backspaces, tabs and carriage returns to be treated as control characters; ! that is, they are handled as specified by the \-r option. .sp ! By default, if neither \-u nor \-U is given, backspaces which appear adjacent to an underscore character are treated specially: the underlined text is displayed *************** *** 746,770 **** using the terminal's hardware boldface capability. Other backspaces are deleted, along with the preceding character. Carriage returns immediately followed by a newline are deleted. ! other carriage returns are handled as specified by the -r option. Text which is overstruck or underlined can be searched for ! if neither -u nor -U is in effect. ! .IP "-V or --version" Displays the version number of .I less. ! .IP "-w or --hilite-unread" Temporarily highlights the first "new" line after a forward movement of a full page. The first "new" line is the line immediately following the line previously at the bottom of the screen. Also highlights the target line after a g or p command. The highlight is removed at the next command which causes movement. ! The entire line is highlighted, unless the -J option is in effect, in which case only the status column is highlighted. ! .IP "-W or --HILITE-UNREAD" ! Like -w, but temporarily highlights the first new line after any forward movement command larger than one line. ! .IP "-x\fIn\fP,... or --tabs=\fIn\fP,..." Sets tab stops. 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 --- 805,829 ---- using the terminal's hardware boldface capability. Other backspaces are deleted, along with the preceding character. Carriage returns immediately followed by a newline are deleted. ! other carriage returns are handled as specified by the \-r option. Text which is overstruck or underlined can be searched for ! if neither \-u nor \-U is in effect. ! .IP "\-V or \-\-version" Displays the version number of .I less. ! .IP "\-w or \-\-hilite-unread" Temporarily highlights the first "new" line after a forward movement of a full page. The first "new" line is the line immediately following the line previously at the bottom of the screen. Also highlights the target line after a g or p command. The highlight is removed at the next command which causes movement. ! The entire line is highlighted, unless the \-J option is in effect, in which case only the status column is highlighted. ! .IP "\-W or \-\-HILITE-UNREAD" ! Like \-w, but temporarily highlights the first new line after any forward movement command larger than one line. ! .IP "\-x\fIn\fP,... or \-\-tabs=\fIn\fP,..." Sets tab stops. 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 *************** *** 772,809 **** last two. For example, \fI-x9,17\fP will set tabs at positions 9, 17, 25, 33, etc. The default for \fIn\fP is 8. ! .IP "-X or --no-init" Disables sending the termcap initialization and deinitialization strings to the terminal. This is sometimes desirable if the deinitialization string does something unnecessary, like clearing the screen. ! .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 "-y\fIn\fP or --max-forw-scroll=\fIn\fP" Specifies a maximum number of lines to scroll forward. If it is necessary to scroll forward more than \fIn\fP lines, the screen is repainted instead. ! The -c or -C option may be used to repaint from the top of the screen if desired. By default, any forward movement causes scrolling. ! .IP "-[z]\fIn\fP or --window=\fIn\fP" Changes the default scrolling window size to \fIn\fP lines. The default is one screenful. The z and w commands can also be used to change the window size. ! The "z" may be omitted for compatibility with .I more. If the number .I n is negative, it indicates .I n lines less than the current screen size. ! 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, the scrolling window automatically changes to 36 lines. ! .IP "-\fI\(dqcc\fP\ or\ --quotes=\fIcc\fP" Changes the filename quoting character. This may be necessary if you are trying to name a file which contains both spaces and quote characters. --- 831,863 ---- last two. For example, \fI-x9,17\fP will set tabs at positions 9, 17, 25, 33, etc. The default for \fIn\fP is 8. ! .IP "\-X or \-\-no-init" Disables sending the termcap initialization and deinitialization strings to the terminal. This is sometimes desirable if the deinitialization string does something unnecessary, like clearing the screen. ! .IP "\-y\fIn\fP or \-\-max-forw-scroll=\fIn\fP" Specifies a maximum number of lines to scroll forward. If it is necessary to scroll forward more than \fIn\fP lines, the screen is repainted instead. ! The \-c or \-C option may be used to repaint from the top of the screen if desired. By default, any forward movement causes scrolling. ! .IP "\-[z]\fIn\fP or \-\-window=\fIn\fP" Changes the default scrolling window size to \fIn\fP lines. The default is one screenful. The z and w commands can also be used to change the window size. ! The "z" may be omitted for compatibility with some versions of .I more. If the number .I n is negative, it indicates .I n lines less than the current screen size. ! 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, the scrolling window automatically changes to 36 lines. ! .IP "\-\fI\(dqcc\fP\ or\ \-\-quotes=\fIcc\fP" Changes the filename quoting character. This may be necessary if you are trying to name a file which contains both spaces and quote characters. *************** *** 816,834 **** Filenames containing a space should then be preceded by the open quote character and followed by the close quote character. Note that even after the quote characters are changed, this option ! remains -" (a dash followed by a double quote). ! .IP "-~ or --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. ! .IP "-# or --shift" Specifies the default number of positions to scroll horizontally in the RIGHTARROW and LEFTARROW commands. If the number specified is zero, it sets the default number of positions to one half of the screen width. ! .IP -- ! A command line argument of "--" marks the end of option arguments. Any arguments following this are interpreted as filenames. ! This can be useful when viewing a file whose name begins with a "-" or "+". .IP + If a command line option begins with \fB+\fP, the remainder of that option is taken to be an initial command to --- 870,913 ---- Filenames containing a space should then be preceded by the open quote character and followed by the close quote character. Note that even after the quote characters are changed, this option ! remains \-" (a dash followed by a double quote). ! .IP "\-~ or \-\-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. ! .IP "\-# or \-\-shift" Specifies the default number of positions to scroll horizontally in the RIGHTARROW and LEFTARROW commands. If the number specified is zero, it sets the default number of positions to one half of the screen width. ! Alternately, the number may be specified as a fraction of the width ! 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. ! This can be useful when viewing a file whose name begins with a "\-" or "+". .IP + If a command line option begins with \fB+\fP, the remainder of that option is taken to be an initial command to *************** *** 852,858 **** certain keys can be used to manipulate the command line. Most commands have an alternate form in [ brackets ] which can be used if a key does not exist on a particular keyboard. ! (The bracketed forms do not work in the MS-DOS version.) Any of these special keys may be entered literally by preceding it with the "literal" character, either ^V or ^A. A backslash itself may also be entered literally by entering two backslashes. --- 931,938 ---- certain keys can be used to manipulate the command line. Most commands have an alternate form in [ brackets ] which can be used if a key does not exist on a particular keyboard. ! (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 it with the "literal" character, either ^V or ^A. A backslash itself may also be entered literally by entering two backslashes. *************** *** 905,910 **** --- 985,992 ---- or cancel the command if the command line is empty. If you have changed your line-kill character in Unix to something 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" You may define your own *************** *** 1019,1033 **** .br case "$1" in .br ! *.Z) uncompress -c $1 >/tmp/less.$$ 2>/dev/null .br ! if [ -s /tmp/less.$$ ]; then .br echo /tmp/less.$$ .br else .br ! rm -f /tmp/less.$$ .br fi .br --- 1101,1115 ---- .br case "$1" in .br ! *.Z) uncompress -\c $1 >/tmp/less.$$ 2>/dev/null .br ! if [ \-s /tmp/less.$$ ]; then .br echo /tmp/less.$$ .br else .br ! rm \-f /tmp/less.$$ .br fi .br *************** *** 1074,1080 **** .br case "$1" in .br ! *.Z) uncompress -c $1 2>/dev/null .br ;; .br --- 1156,1162 ---- .br case "$1" in .br ! *.Z) uncompress \-c $1 2>/dev/null .br ;; .br *************** *** 1087,1093 **** but it is usually not necessary since there is no replacement file to clean up. In this case, the replacement file name passed to the LESSCLOSE ! postprocessor is "-". .SH "NATIONAL CHARACTER SETS" There are three types of characters in the input file: --- 1169,1191 ---- but it is usually not necessary since there is no replacement file to clean up. In this case, the replacement file name passed to the LESSCLOSE ! 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" There are three types of characters in the input file: *************** *** 1131,1138 **** Selects a character set appropriate for NeXT computers. .IP utf-8 Selects the UTF-8 encoding of the ISO 10646 character set. .PP ! In special cases, it may be desired to tailor .I less to use a character set other than the ones definable by LESSCHARSET. In this case, the environment variable LESSCHARDEF can be used --- 1229,1240 ---- Selects a character set appropriate for NeXT computers. .IP utf-8 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 ! In rare cases, it may be desired to tailor .I less to use a character set other than the ones definable by LESSCHARSET. In this case, the environment variable LESSCHARDEF can be used *************** *** 1173,1179 **** next\ \ 8bcccbcc18b95.bb125.bb .PP If neither LESSCHARSET nor LESSCHARDEF is set, ! but the string "UTF-8" is found in the LC_ALL, LC_TYPE or LANG environment variables, then the default character set is utf-8. .PP If that string is not found, but your system supports the --- 1275,1282 ---- next\ \ 8bcccbcc18b95.bb125.bb .PP If neither LESSCHARSET nor LESSCHARDEF is set, ! 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. .PP If that string is not found, but your system supports the *************** *** 1204,1214 **** printf-style escape sequence (a % followed by x, X, o, d, etc.). For example, if LESSBINFMT is "*u[%x]", binary characters are displayed in underlined hexadecimal surrounded by brackets. ! The default if no LESSBINFMT is specified is "*s<%X>". .SH "PROMPTS" ! The -P option allows you to tailor the prompt to your preference. ! The string given to the -P option replaces the specified prompt string. Certain characters in the string are interpreted specially. The prompt mechanism is rather complicated to provide flexibility, but the ordinary user need not understand the details of constructing --- 1307,1334 ---- printf-style escape sequence (a % followed by x, X, o, d, etc.). For example, if LESSBINFMT is "*u[%x]", binary characters are displayed in underlined hexadecimal surrounded by brackets. ! 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 "". ! 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" ! The \-P option allows you to tailor the prompt to your preference. ! The string given to the \-P option replaces the specified prompt string. Certain characters in the string are interpreted specially. The prompt mechanism is rather complicated to provide flexibility, but the ordinary user need not understand the details of constructing *************** *** 1225,1231 **** an "m" means use the middle line, a "b" means use 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. .IP "%B" Replaced by the size of the current input file. .IP "%c" --- 1345,1351 ---- an "m" means use the middle line, a "b" means use 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. .IP "%B" Replaced by the size of the current input file. .IP "%c" *************** *** 1243,1248 **** --- 1363,1370 ---- See the discussion of the LESSEDIT feature below. .IP "%f" 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" Replaced by the index of the current file in the list of input files. *************** *** 1350,1356 **** Finally, any trailing spaces are truncated. This is the default prompt. For reference, here are the defaults for ! the other two prompts (-m and -M respectively). Each is broken into two lines here for readability only. .nf .sp --- 1472,1478 ---- Finally, any trailing spaces are truncated. This is the default prompt. For reference, here are the defaults for ! the other two prompts (\-m and \-M respectively). Each is broken into two lines here for readability only. .nf .sp *************** *** 1398,1408 **** the examine command. .IP "v" the editing command ! .IP "s -o" log files ! .IP "-k" use of lesskey files ! .IP "-t" use of tags files .IP " " metacharacters in filenames, such as * --- 1520,1530 ---- the examine command. .IP "v" the editing command ! .IP "s \-o" log files ! .IP "\-k" use of lesskey files ! .IP "\-t" use of tags files .IP " " metacharacters in filenames, such as * *************** *** 1412,1417 **** --- 1534,1569 ---- .PP 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" Environment variables may be specified either in the system environment as usual, or in a *************** *** 1447,1454 **** .I less automatically. .IP LESSANSIENDCHARS ! Characters which are assumed to end an ANSI color escape sequence (default "m"). .IP LESSBINFMT Format for displaying non-printable, non-control characters. .IP LESSCHARDEF --- 1599,1610 ---- .I less automatically. .IP LESSANSIENDCHARS ! Characters which may end an ANSI color escape sequence (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 Format for displaying non-printable, non-control characters. .IP LESSCHARDEF *************** *** 1465,1474 **** Editor prototype string (used for the v command). See discussion under PROMPTS. .IP LESSGLOBALTAGS ! Name of the command used by the -t option to find global tags. Normally should be set to "global" if your system has the .I global (1) command. If not set, global tags are not used. .IP LESSKEY Name of the default lesskey(1) file. .IP LESSKEY_SYSTEM --- 1621,1641 ---- Editor prototype string (used for the v command). See discussion under PROMPTS. .IP LESSGLOBALTAGS ! Name of the command used by the \-t option to find global tags. Normally should be set to "global" if your system has the .I global (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 Name of the default lesskey(1) file. .IP LESSKEY_SYSTEM *************** *** 1487,1492 **** --- 1654,1665 ---- See discussion under SECURITY. .IP LESSSEPARATOR 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 Sets the number of lines on the screen. Takes precedence over the number of lines specified by the TERM variable. *************** *** 1508,1553 **** .SH "SEE ALSO" 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 ! Copyright (C) 2002 Mark Nudelman .PP less is part of the GNU project and is free software. You can redistribute it and/or modify it --- 1681,1688 ---- .SH "SEE ALSO" lesskey(1) .SH COPYRIGHT ! Copyright (C) 1984-2011 Mark Nudelman .PP less is part of the GNU project and is free software. You can redistribute it and/or modify it *************** *** 1574,1577 **** .br Send bug reports or comments to the above address or to bug-less@gnu.org. .br ! For more information, see the less homepage at http://www.greenwoodsoftware.com/less. --- 1709,1716 ---- .br Send bug reports or comments to the above address or to bug-less@gnu.org. .br ! 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.