more(1) more(1)
NAME
more - control the output on the screen
SYNOPSIS
more [-[+]aBcCdeEfFHiIlLmMqQrsuUw] [-bnumber] [-jnumber] [-[n]number]
[-knumber] [-Inumber] [-P[mM=]string] [-o file | -O file]
[-Kfile] [-ttag] [-Ttagsfile] [-pcommand] file ...
more -h
DESCRIPTION
more reads files and outputs them page-by-page or to the standard out-
put. It allows both forward and backward movement in a file. more does
not have to have read the entire input file before starting, and
therefore starts up faster than text editors such as vi(1), for exam-
ple.
more uses the terminfo(4) file and can therefore run on a variety of
terminals. There is also limited support on hardcopy terminals. (On a
hardcopy terminal, lines which should be displayed at the top of the
screen are prefixed with an up-arrow.)
OPTIONS
Command line options are described below. Most of the options can be
changed with the - command while more is active.
Options are also read from the MORE environment variable. If, for
example, you do not want to enter more -options ... for every more
call, you can enter the following for the C shell csh.
setenv MORE -options
If you use the sh Bourne shell, enter the following:
MORE=-options; export MORE
The environment variable is evaluated before the command line, so that
the command line options can overwrite the value of the MORE environ-
ment variable. If the MORE variable contains an option, you can reset
the option in the command line to its default value by preceding the
command line option with -+.
The dollar sign ($) indicates the end of an option value. This is only
important for options such as -P that are followed by a string.
-a Searches are started after the last line displayed on the screen,
i.e. all lines displayed on the screen are skipped. By default,
searches start in the fourth line of the display (or after the
last line found, see option -x).
Page 1 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
-bnumber
Causes more to use a number of buffers that does not correspond
to the default number. The buffers are each 1 KB in size, and 10
buffers are used by default (except if the data is coming from
the standard input; see option -B). n specifies the number of
buffers to be used.
-B Disables the automatic allocation of buffers so that the default
number of buffers is used. If more data is read than can fit in a
buffer, that oldest data is deleted. If data comes from the stan-
dard input, the buffers are by default automatically allocated as
required, to avoid data loss.
-c The entire screen is refreshed from top to bottom. This happens
by default when scrolling from the bottom of the screen.
-C The -C option behaves like -c, but the screen is deleted before
being refreshed.
-d The -d option suppresses error messages that would normally be
displayed on a non-intelligent terminal, i.e. if the terminal was
missing an important function such as the facility to clear the
screen or scroll backward. The -d option otherwise has no influ-
ence on the behavior of more on a non-intelligent terminal.
-e Causes more to automatically exit the file the first time it
reaches the end of the file. By default, more exits when it
reaches the end of the file for the second time.
-E Causes more to quit after q is entered, not automatically.
-f Lines that are longer than the screen width are not folded, the
part of the line that cannot be displayed is truncated. This part
of a long line is simply deleted. By default, long lines are
folded, i.e. the part of the line which goes beyond the width of
the screen is displayed in the next line.
-F Forces non-regular files to be opened. (A non-regular file is a
directory or a device-oriented file.) This option also suppresses
the warning message when opening a binary file. By default, more
will not open a non-regular file.
-h This option shows a summary of the commands accepted by more.
(Corresponds to the h command). If this option is specified, all
other options are ignored. In this case, more exits after the
help screen is displayed.
-i Case is ignored during a search, i.e. lowercase and uppercase are
regarded as the same. A search can also be conducted for over-
scored or underscored text. This option is ignored if the search
pattern itself contains uppercase letters.
Page 2 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
-Inumber
A tab is set after each n columns. The default value for n is 8.
-jnumber
Specifies the maximum number of lines can that be scrolled for-
ward. If more than n lines must be scrolled forward, the screen
is refreshed instead. With the -c or -C option, the screen can be
refreshed from top to bottom if necessary. By default, every for-
ward movement is a scrolling process.
-kn Specifies the maximum number of lines that can be scrolled back-
ward. If more than n lines must be scrolled forward, the screen
is instead refreshed in a forward direction. (If the terminal
cannot scroll forward, -k0 is accepted implicitly.)
-Kfile
more opens and interprets the specified file as a lesskey(1)
file. The -K option can be specified more than once. If there is
a .more in your HOME directory, this file is also used as a less-
key file.
-l Suppresses line numbers. By using the default value (using the
line number), more can be extremely slow in some cases, espe-
cially if the input file is large. This problem is avoided by
suppressing line numbering with the -l option. The use of line
numbering means that the line number is displayed in the detailed
prompt and in the = command. The v also passes the current line
number to the editor. (Read the explanation of LESSEDIT in the
PROMPTS section below.)
-L Displays a line number at the start of each line on the screen.
-m Causes more to output only a colon a prompt. By default, the
prompt for more is the filename and the percent into the previous
file.
-M Causes more to prompt in a more detailed manner.
-[n]number
changes the default value for scrolling n lines. The default
value is a screenful. With the z and w commands, the window size
can also be modified. The n character can be left out of older
versions of more for compatibility reasons (example: -n).
-ofile
Causes more to copy the input in the specified file while it is
displayed. This happens only if the input file is a pipe and not
a normal file. If the file already exists, more asks you to con-
firm the overwriting of the file.
Page 3 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
-Ofile
The -O option corresponds to the -o option, except that an exist-
ing file is overwritten without a confirmation request.
If there is no log file specified, it can be specified by more
using the -o and -O options. If there is no filename specified
for these options, they will transfer only the name of the log
file. The o command corresponds to specifying -o within more.
-pcommand
The -p option in the command line is the same as specifying
+/command, i.e. more executes command each time at new file is
displayed.
This is the same as the +command that is also supported.
-Pprompt
Allows the three prompt forms to be customized to meet your
requirements. This option is normally entered in the MORE envi-
ronment variable and not re-entered for every new more command.
Such an option must either be specified as the last option in the
MORE variable or be terminated with a dollar sign. If -P followed
by a string is specified, the standard medium prompt in this
string is changed. -Pm changes the short prompt (-m) in the
specified string, and -PM changes the long prompt (-M). -P= also
changes the message returned by = in the specified command line.
All strings for a prompt consist of a combination of letters and
special escape sequences. You can find more information in the
PROMPTS section.
-q The process is executed relatively "quietly": the terminal does
not signal acoustically if an attempt is made to scroll past the
beginning or end of the file. If the terminal has a "visual sig-
nal" facility, this is used instead of the acoustic signal. The
acoustic signal sounds for certain other errors, e.g. if an
invalid character is entered. By default, the terminal sounds in
all cases.
-Q The process is executed completely "quietly": The acoustic signal
is never sounded.
-r Control characters are displayed in RAW mode (usually unchanged).
By default, control characters are displayed using the carat
notation. For example, Ctrl+A (Octal 001) is represented as ^A.
Warning: If the -r option is used, more cannot follow the screen
output, because it depends on how the screen reacts to each type
of control character. Various screen problems may result, such as
long lines being split in the wrong place.
-s Consecutive blank lines are squeezed into one blank line. This is
useful when displaying nroff(1M) output.
Page 4 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
-ttag
This command processes the file containing the specified tag
mark. It only works if the current directory contains a tags file
created using the ctags(1) command. By specifying this option
within more (- command), the corresponding file is displayed. The
:t command is the same as specifying -t within more.
-Ttagsfile
Specifies a "tags" file that should be used instead of tags.
-u Backspaces and carriage returns are treated as printable charac-
ters, i.e. these characters are sent to the terminal if they
appear in the input.
-U Backspaces and carriage returns are treated as control charac-
ters, i.e. they are dealt with as specified by the -r option.
If neither -u nor -U is specified, backspaces adjacent to an
underscore have a special meaning: The underscored text is
displayed using the terminal hardware's underscoring facility.
Backspaces between two of the same characters also have a special
meaning: The overstruck text is displayed using the terminal
hardware's boldface facility. Other backspaces are deleted along
with any preceding characters. Carriage returns immediately fol-
lowed by a NEWLINE character are deleted. All other carriage
returns are dealt with as specified by the -r option.
-w Lines after the end of the file are represented as blank lines.
By default, a tilde is used for this.
-xnumber
Specifies a line on the screen where "target" lines should be
positioned. Target lines are the result of text or marks
searches, jumps to a line, to a position specified by a percen-
tage, or to a marked position. The screen line is specified by a
number: The first line is number 1, the second number 2 and so
on. A line relative to the bottom line of the screen is specified
by a negative number: The last line on the screen is number -1,
the second- last number -2 and so on. If the -x is specified, the
search begins immediately after the target line. With -x4, for
example, the target line is the fourth line on the screen and the
search begins in the fifth line.
+ If an option in the command line begins with +, it is interpreted
as an initial command for more. With +G, for example, more is
instructed to begin at the start of the file and not the end. +/xyz
instructs more to start at the first occurrence of "xyz". +number
is a special case and behaves like +numberg, i.e. the display is
started with the number line. (Note the g command below.) If the
option begins with ++, the initial command is valid for every file
displayed, and not just for the first. Using the + command, an ini-
tial command can be set (or changed) for every file.
Page 5 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
file A pathname of an input file.
COMMANDS
The commands are based on the vi editor. The commands can be preceded
by a decimal number, described as N in the descriptions below. The
effects of N are described in the individual commands.
In the following descriptions, ^X stands for Ctrl+X. ESC stands for
the ESCAPE key; e.g. ESC-v stands for the key sequence "ESCAPE" and
"v".
h or H
Help: Displays a summary of all the commands. This is the most
important command to know.
SPACE or ^V or f or ^F
Scrolls forward N lines. The default value is one window (see the
-n option above). If N is greater than the number of lines in a
window, the Nth line of the last screen is displayed.
Warning: In some systems the ^V character is used as a metachar-
acter to represent non-printing characters.
z Like SPACE. If N is specified, this specifies the new window
size.
RETURN or ^N or e or ^E or j or ^J
Scrolls forward N lines. The default value is one line. The
entire N lines are shown, even if the number of lines is greater
than the size of the screen.
At the file end RETURN has the effect that more displays the next
file from the list of files, or quits, if the current file was
the last one.
s Skips the next N lines and displays the next screen. The default
value for N is one line. If after the skip there are less lines
than fit on a screen, a full screen is displayed nonetheless with
the end of the file.
d or ^D
Scrolls forward N lines. The default value is half the screen. If
N is specified, this value becomes the new default value for the
d and u commands that follow.
b or ^B or ESC-v
Scrolls backward N lines. The default value is a screen (see the
-n option above). If N is greater than the number of lines on a
screen, the Nth line of the last screen is displayed.
w Like b. If N is specified the new window size to be scrolled
through is defined.
Page 6 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
y or ^Y or ^P or k or ^K
Scrolls backward N lines. The default value is one line. The
entire N lines are shown, even if the number of lines is greater
than the size of the screen.
Warning: In some systems, the ^Y is used as a metacharacter for
job sequencing.
u or ^U
Scrolls backward N lines. The default value is one half of the
screen. If N is specified, this value becomes the new default
value for subsequent d and u commands.
r or ^R or ^L
Refreshes the screen.
R Refreshes the screen and deletes any input saved in the buffer.
This command is useful if the file changes while it is being
displayed.
F Scrolls forward and keeps trying to read the file when it reaches
the end. This command is normally when already at the end of the
file. This means the end of the file that is growing while it is
being displayed. (The behavior of the command is similar to that
of the tail -f command.)
g or < or ESC-<
Goes to line N in the file. The default value is the beginning of
the file.
Warning: This command can take some time if a large value is
specified for N.
G or > or ESC->
Goes to line N in the file. The default value is the end of the
file.
Warning: This command can take some time if a large value is
specified for N, or if N is not specified, and the standard input
is read instead of a file.
p or %
Goes to a position N% into the file. N must be a value between 0
and 100. (This also works if the standard is read, but only if
more has already read the file to the end. This command executes
quickly, but is not always useful.)
{ If there is a left brace is the top line of the screen, the {
command goes to the corresponding right brace. This brace is
displayed in the bottom line of the screen. If there is more than
one left brace in the top line of the screen, a number N can be
used to specify the corresponding right brace.
Page 7 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
} If there is a right brace in the bottom line of the screen, the }
command goes to to the corresponding left brace. This brace is
displayed in the top line of the screen. If there is more than
one right brace in the bottom line of the screen, a number N can
be used to specify the corresponding left brace.
( Like {, but this command applies to parentheses rather than
braces.
) Like }, but this command applies to parentheses rather than
braces.
[ Like {, but this command applies to square brackets rather than
braces.
] Like }, but this command applies to square brackets rather than
braces.
ESC-^F
This command behaves like { when followed by two characters, how-
ever it uses both characters as open and close brackets. With the
ESC+^F < > command for example, you can scroll forward to the >
character that corresponds to the < character in the top line of
the screen.
ESC-^B
This command behaves like } when followed by two characters, how-
ever it uses both characters as open and close brackets. With the
ESC+^B < > command for example, you can scroll backward to the <
character that corresponds to the > character in the bottom line
of the screen.
m A lower case letter is specified after this command. This command
marks the current position with this letter.
' or ^X^X
(Single quote or ^X^X) Followed by any lowercase letter, this
command returns to the position previously marked with the speci-
fied lower case letter using the m command. If this command is
entered with another single quote, it goes back to the position
at which the last "large" movement command was executed. If this
command is followed by the ^ or $ character, it skips to the
beginning or the end of the file. Markings are preserved when a
new file is displayed so the ' command can be used to switch
between files.
/pattern
Searches forward in the file for the Nth line containing the
specified pattern. The default value for N is 1. The pattern is a
regular expression, as in the ed editor. The search begins in the
fourth line displayed. (Read the descriptions of the -a and -x
options, which alter the behavior of this command.)
Page 8 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
Some characters have a special meaning when specified at the
start of a pattern. They change the search type and do not belong
to the search pattern. This applies to the following characters:
! Searches for lines that do NOT match the search pattern.
* Searches multiple files: if the search reaches the end of the
current file without finding the specified pattern, the
search is continued in the next file specified in the command
line.
@ The search is started in the first line of the first file
specified in the command line. This occurs regardless of the
current screen displayed and the settings of the -a and -x
options.
?pattern
Searches backward in the file for the Nth line containing the
specified pattern. The search starts in the line immediately
before the current position (i.e. in the second line displayed).
As in the /pattern command, some characters in this command have
a special meaning:
! Searches for lines that do NOT match the search type.
* Searches multiple files: If the search reaches the beginning
of the current file without finding the specified pattern,
the search is continued in the previous file specified in the
command line.
@ The search is started in the last line of the last file
specified in the command line. This occurs regardless of the
current screen displayed and the settings of the -a and -x
options.
ESC-/pattern
Like /*.
ESC-?pattern
Like ?*.
n Repeats the last search process and searches for the Nth line
containing the last pattern specified. If the last search command
was modified by !, the search is made for the Nth line that does
NOT contain the specified pattern. If the last search command was
modified by *, the search process is continued in the next (or
preceding) file, provided that the pattern is not found in the
current file. If the last search command was modified by @, n has
no effect.
N Repeats the last search, but in the opposite direction.
Page 9 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
ESC-n
Repeats the last search process across file boundaries. The
effect is the same as if the last search command were modified by
*.
ESC-N
Repeats the last search, but in the opposite direction, and
across file boundaries.
:e [file] or E [file] or ^X^V [file]
Displays a new file. If no filename is specified, the "current"
file (see the descriptions of the :n and :p commands below) from
the list of files in the command file is displayed again. A per-
cent sign (%) in the filename is replaced by the name of the
current file. A number sign (#) is replaced by the name of the
last file displayed. The filename is added to the list of files
in the command line so that it is considered by subsequent :n and
:p commands. If a number of files are specified under file, all
the files are added to the list and the file specified first is
displayed.
Warning: In some systems the ^V is used as a metacharacter to
represent non-printing characters.
:n Displays the next file in the command line. If a number N is
specified, the Nth next file is displayed.
:p Displays the previous file in the command line. If a number N is
specified, the Nth-last file is displayed.
:x Displays the first file in the command line. If a number N is
specified, the Nth file in the list is displayed.
= or ^G or :f
Outputs information about the specified files. This information
includes the filename, the line number, and the byte offset from
the bottom line. If possible, the length of the file, the number
of lines, and the percentage of the file above the last line
displayed is also output.
- In combination with one of the command line option letters (see
above), this command changes the setting of the corresponding
option and returns a message describing the new setting. If the
option letter has a numeric argument (such as -b or -k) or is
specified with a string (such as -P or -t), a new value for this
argument can be entered after the option letter. If no new value
is entered, a message with the current setting is output, and
this setting is not changed.
-+ In combination with one of the command line option letters (see
above), this command resets the corresponding option to its
default value and returns a message describing the new setting.
Page 10 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
(The -+X command behaves in exactly the same manner as -+X in the
command line.) This does not function for options that expect
strings as arguments.
-- In combination with one of the command line option letters (see
above), this command resets the corresponding option to the oppo-
site of its default value and returns a message describing the
new setting. (The --X command behaves in exactly the same manner
as the -X in the command line.) This does not function for
options that expect strings as values.
(Underscore) In combination with one of the command line option
letters (see above), this command returns a message with the
current setting of the specified option. The option setting is
not changed.
+command
The command command is executed every time a new file is
displayed. By specifying +G, for example, more displays every
file from end to beginning, and not from beginning to end.
V Outputs the version number of the active more program.
q or :q or :Q or ZZ or ESC+ESC
Exits more.
v Calls an editor to process the file just displayed. The editor to
be called up is extracted from the EDITOR environment variable.
If no editor is specified there, vi is used by default. Read the
explanations of LESSEDIT in the PROMPTS section below.
! shell-command
Calls a shell that executes the shell command specified by
shell-command. A percent sign (%) in the command is replaced by
the name of the current file. A number sign (#) is replaced by
the name of the last file displayed. !! repeats the last shell
command. ! without a shell command calls a shell. In all cases
the shell to be called is extracted from the SHELL environment
variable or the sh default value is used.
| m shell-command
m represents a mark letter. A section of the input file is piped
to the specified shell (shell-command). The section is between
the current position and the position indicated by the mark
letter. m can have a value of ^ or $, to specify the beginning or
end of the file. If m is . or if a NEWLINE character is speci-
fied, the current screen is piped. The current screen is the
smallest part of the file that can be piped.
Page 11 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
KEY BINDINGS
You can define some more commands by creating a .more file with the
lesskey program in your HOME directory. This file specifies a set of
command keys and actions allocated to the individual keys. You can
find more information about this under lesskey(1).
NATIONAL CHARACTER SETS
The input file contains three types of characters:
Normal (printable) characters
can be displayed directly on the screen.
Control characters
should not be displayed directly, but can be contained in normal
text files (e.g. backspaces and tabs).
Binary characters
cannot be displayed directly and should not normally be contained
in text files.
By default, more uses the national environment character set (defined
by the LCALL, LCTYPE, and LANG environment variables). With the
LESSCHARSET environment variable, a different character set can be
selected. If this variable is set to ascii, the ASCII character set is
used. In the ASCII character set, characters with values between 128
and 255 are interpreted as binary characters. If this variable is set
to latin1, the ISO 8859/1 character set is used. The Latin-1 character
set is the same as the ASCII character set with the exception that
characters between 128 and 255 are interpreted as normal characters.
If this variable is set to locale, the national character set defined
in the local environment is used. At the moment only locale, ascii and
latin1 values are valid for LESSCHARSET.
In some cases it may be desirable to change more, so that a different
character set is used to the one defined in LESSCHARSET. To do this a
character set is defined in the LESSCHARSET environment variable. This
variable should be allocated a string that describes every character
in the set. . is used to indicate normal characters, c control charac-
ters, b binary characters, and l for the character type in the local
environment. A decimal number can be specified to repeat this. Speci-
fying bccc4b., for example, means that 0 is a binary character, 1, 2,
and 3 are control characters, 4, 5, 6, and 7 are binary characters and
8 is a normal character. The specification for the last character is
valid for all characters following it, i.e. 9-255 are normal charac-
ters. (This is only an example and does not necessarily represent an
actual character set.)
Setting the LESSCHARDEF variable to 8bcccbcc18b95.b is the same as
setting LESSCHARSET to ascii. If you set the LESSCHARDEF variable to
8bcccbcc18b95.33b., it is the same as setting LESSCHARSET to latin1.
If you set the LESSCHARDEF variable to 8lccclccl, it is the same as
setting LESSCHARSET to locale.
Page 12 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
Control and binary characters are displayed blinking. Each of these
characters is indicated by a carat, if possible (e.g. ^A for Ctrl+A).
This indication is only used when converting the 0100 bit to a normal
printable character. Otherwise the character is represented as an
octal number preceded by a backslash. You can change this octal format
by setting the LESSBINFMT to a format string as in printf. The default
value is '\%o'.
PROMPTS
With the -P option you can customize the prompt to suit your needs.
The prompt is replaced by the string specified in the -P option. Cer-
tain characters in the string are interpreted in a particular way. The
prompting mechanism is very complicated to be able to offer flexibil-
ity in the way the prompt is formulated.
A combination of percent signs followed by a single character is
expanded to what the following character is:
%bX Is replaced by the byte offset of the current input file. b is
followed by a single character (as in X above), specifies the
line whose byte offset should be used. If this character is t
(top), the byte offset of the top line of the display is used, m
(middle) indicates the middle line, b (bottom) the bottom line,
and B the line directly after the bottom line. x specifies that
the "target line" specified by the -x option should be used (as
in -x).
%B Is replaced by the size of the current input file.
%E Is replaced by the name of the editor (from the EDITOR environ-
ment variable, otherwise vi). You can find more information about
this in the description of the LESSEDIT environment variable
below.
%f Is replaced by the name of the current input file.
%i Is replaced by the index of the current file in the list of input
files.
%lX Is replaced by the number of a line in the input file. The line
to be used is specified in the %b option under X.
%L Is replaced by the number of the last line in the input file.
%m Is replaced by the number of input files.
%pX Is replaced by the percentage proportion of the current file. The
line to be used in specified in the %b option under X.
%s Like %B.
Page 13 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
%t Subsequent blanks are deleted. This option is normally specified
at the end of a string, but can occur anywhere.
%x Is replaced by the name of the next input file in the list.
If there is an unknown element (e.g. the file size, if the input is a
pipe), a question mark is used instead.
The string format for the prompt can be changed depending on certain
conditions. A question mark followed by a single character, behaves
like an IF instruction. Depending on the character after the question
mark, a condition is evaluated. If this condition is TRUE, all charac-
ters after the question mark and condition character, up to a period,
are included in the prompt. If the condition is FALSE, the characters
are not included. Specifying a colon between the question mark and the
period is the same as an ELSE instruction: the character between the
colon and the period are only added to the prompt if the IF condition
is FALSE. The following characters can be used as condition characters
(after a question mark):
?a True if characters have already been included in the prompt.
?bX True if the byte offset of the specified file is known. Like %b,
X can have the values t (top), m (middle) and b or B (bottom). x
as well.
?B True if the size of the current input file is known.
?e True if the end of the file is reached.
?f True if the input file is named, signifying input and not a pipe.
?lX True if the number of the specified line is known. Like %b, X can
have the values t (top), m (middle) and b or B (bottom). x as
well.
?L True if the number of the last line in the file is known.
?m True if there is more than one input file.
?n True if it is the first prompt in a new input file.
?pX True if the percentage proportion of the file up to the specified
line is known. Like %b, X can have the values t (top), m (middle)
and b or B (bottom). x as well.
?s Like ?B.
?x True if there is another input file, i.e. the current file is not
the last one.
Page 14 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
All characters, with the exception of metacharacters (question marks,
colons, periods, percentage signs and backslashes), are prompt ele-
ments. If metacharacters are also to be included in the prompt, they
must be preceded by a backslash.
Some examples:
?f%f:Standard input.
This prompt outputs the name of the file if it is known. If the name
is not known, the Standard input string is output.
?f%f .?ltLine %lt:?pt%pt\%:?btByte %bt:-...
This prompt outputs the filename if it is known. The line number, if
known, is then output. If the line number is not known, the percentage
information is output, and if this is not known either, the byte
offset is output. If no value is known, a dash is printed. Note that
for every question mark there is a corresponding period, and the %
special character is added after %pt in the prompt, because it is pre-
ceded by a backslash.
?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x.:
?pB%pB\%:byte %bB?s/%s...%t
The strings are divided into two lines to improve legibility. If the
prompt is the first in a file, the filename is output. A (file N of N)
message is output after the filename if there is more than one file.
At the end of the file the (END) string is output followed by the name
of the next file, if one exists. Otherwise percentage output informa-
tion is output. If this is not known, the byte offset is output, fol-
lowed by the file size (if known). Subsequent null characters are then
truncated. This is the standard prompt.
The default values for the two other prompts (-m or -M) are shown for
reference purposes.
?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x..%t
?f%f .?n?m(file %i of %m) ..?ltline %lt?L/%L. :byte %bB?s/%s. .
?e(END) ?x- Next\: %x.:?pB%pB\%..%t
The = outputs the following default message:
?f%f .?m(file %i of %m) .?ltline %lt?L/%L. .
byte %bB?s/%s. ?e(END) :?pB%pB\%..%t
The prompt expansion features are also used for another purpose: if a
LESSEDIT environment variable is defined, its value is executed as the
v command. The string in LESSEDIT is expanded in the same way as the
prompt strings. LESSEDIT has the following default values:
Page 15 Reliant UNIX 5.44 Printed 11/98
more(1) more(1)
%E ?lx+%lx. %f
This value expands to the editor name, followed by a +, the line
number and the filename. If your editor does not accept the
+linenumber syntax or if there are other discrepancies in the syntax
for calling the editor, you can change the default value by processing
the LESSEDIT variable.
ENVIRONMENT VARIABLES
COLUMNS
Determines the number of columns on the screen. This value has
priority over the number of columns set in the TERM variable.
EDITOR
The editor name (used for the v command).
HOME The name of the user's HOME directory (used for searching for the
.more file).
If a number of files are specified with :e, and one of these files was
already displayed, these new files may be entered in an unexpected
order in the list.
The handling of national character sets is both non-standard and
insufficient for multibyte characters (unless the default value or
locale is used). This may change in a later release.
SEE ALSO
less(1), lesskey(1).
Page 16 Reliant UNIX 5.44 Printed 11/98