MORE(1POSIX)

๐Ÿ’– MORE(1POSIX) ๐Ÿ’–

okay bestie, gather round โ€” this one lives in the POSIX Programmer's Manual, and it's the page for more, the utility that shows you files one screenful at a time. ๐Ÿซถ


๐ŸŒธ PROLOG ๐ŸŒธ

So like, real talk first: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ, so pls pls pls consult the corresponding Linux manual page for the deets on Linux behavior. And lowkey, the interface might not even be implemented on Linux at all. ๐Ÿ’€ Just so you know.


โœจ NAME โœจ

more โ€” display files on a page-by-page basis ๐Ÿ‘‘


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

more [-ceisu] [-n number] [-p command] [-t tagstring] [file...]

๐Ÿ’… DESCRIPTION ๐Ÿ’…

The more utility shall read files and then either write them to the terminal on a page-by-page basis, or filter them straight to standard output. That's the whole vibe check right there.

If standard output is not a terminal device, then literally all the input files shall be copied to standard output in their entirety, without modification โ€” except as specified for the -s option. No editing, no messing, just a straight copy.

But if standard output is a terminal device? Then the files shall be written a number of lines โ€” one screenful โ€” at a time, under the control of user commands. ๐Ÿ‘‘ See the EXTENDED DESCRIPTION section for that whole situation.

Now, some block-mode terminals are, like, not it. Certain block-mode terminals do not have all the capabilities necessary to support the complete more definition โ€” they are incapable of accepting commands that are not terminated with a <newline>. ๐Ÿ˜ญ

Implementations that support such terminals shall provide an operating mode to more in which all commands can be terminated with a <newline> on those terminals. This mode:

  • Shall be documented in the system documentation
  • Shall, at invocation, inform the user of the terminal deficiency that requires the <newline> usage and provide instructions on how this warning can be suppressed in future invocations
  • Shall not be required for implementations supporting only fully capable terminals
  • Shall not affect commands already requiring <newline> characters
  • Shall not affect users on the capable terminals from using more as described in this volume of POSIX.1โ€2017

๐ŸŽ€ OPTIONS ๐ŸŽ€

The more utility shall conform to the Base Definitions volume of POSIX.1โ€2017, Section 12.2, Utility Syntax Guidelines โ€” with one lil twist: '+' may be recognized as an option delimiter as well as '-'. iykyk.

The following options shall be supported:

  • -c โ€” If a screen is to be written that has no lines in common with the current screen, or more is writing its first screen, more shall not scroll the screen. Instead it shall redraw each line of the screen in turn, from the top of the screen to the bottom. Plus, if more is writing its first screen, the screen shall be cleared. Ngl though, this option may be silently ignored on devices with insufficient terminal capabilities. ๐Ÿ™ˆ
  • -e โ€” Exit immediately after writing the last line of the last file in the argument list. See the EXTENDED DESCRIPTION section for more.
  • -i โ€” Perform pattern matching in searches without regard to case. See the Base Definitions volume of POSIX.1โ€2017, Section 9.2, Regular Expression General Requirements.
  • -n number โ€” Specify the number of lines per screenful. The number argument is a positive decimal integer. The -n option shall override any values obtained from any other source. Periodt.
  • -p command โ€” Each time a screen from a new file is displayed or redisplayed (including as a result of more commands; for example, :p), execute the more command(s) in the command arguments in the order specified, as if entered by the user after the first screen has been displayed. No intermediate results shall be displayed โ€” that is, if the command is a movement to a screen different from the normal first screen, only the screen resulting from the command shall be displayed. If any of the commands fail for any reason, an informational message to this effect shall be written, and no further commands specified using the -p option shall be executed for this file.
  • -s โ€” Behave as if consecutive empty lines were a single empty line. โœจ
  • -t tagstring โ€” Write the screenful of the file containing the tag named by the tagstring argument. See the ctags utility. The tags feature represented by -t tagstring and the :t command is optional. It shall be provided on any system that also provides a conforming implementation of ctags; otherwise, the use of -t produces undefined results. ๐Ÿ˜ญ

The filename resulting from the -t option shall be logically added as a prefix to the list of command line files, as if specified by the user. If the tag named by the tagstring argument is not found, it shall be an error, and more shall take no further action.

If the tag specifies a line number, the first line of the display shall contain the beginning of that line. If the tag specifies a pattern, the first line of the display shall contain the beginning of the matching text from the first line of the file that contains that pattern. If the line does not exist in the file or matching text is not found, an informational message to this effect shall be displayed, and more shall display the default screen as if -t had not been specified.

If both the -t tagstring and -p command options are given, the -t tagstring shall be processed first. That is, the file and starting line for the display shall be as specified by -t, and then the -p more command shall be executed. If the line (matching text) specified by the -t command does not exist (is not found), no -p more command shall be executed for this file at any time.

  • -u โ€” Treat a <backspace> as a printable control character, displayed as an implementation-defined character sequence (see the EXTENDED DESCRIPTION section). This suppresses backspacing and the special handling that produces underlined or standout mode text on some terminal types. Also, do not ignore a <carriage-return> at the end of a line.

๐ŸŒˆ OPERANDS ๐ŸŒˆ

The following operand shall be supported:

  • file โ€” A pathname of an input file. If no file operands are specified, the standard input shall be used. If a file is '-', the standard input shall be read at that point in the sequence. ๐Ÿซถ

๐Ÿ“ STDIN ๐Ÿ“

The standard input shall be used only if no file operands are specified, or if a file operand is '-'. That's it, that's the rule.


๐Ÿงš INPUT FILES ๐Ÿงš

The input files being examined shall be text files.

If standard output is a terminal, standard error shall be used to read commands from the user.

If standard output is a terminal, standard error is not readable, and command input is needed, more may attempt to obtain user commands from the controlling terminal (for example, /dev/tty). Otherwise, more shall terminate with an error indicating that it was unable to read user commands. ๐Ÿ’€

If standard output is not a terminal, no error shall result if standard error cannot be opened for reading.


๐Ÿ’œ ENVIRONMENT VARIABLES ๐Ÿ’œ

The following environment variables shall affect the execution of more:

  • COLUMNS โ€” Override the system-selected horizontal display line size. See the Base Definitions volume of POSIX.1โ€2017, Chapter 8, Environment Variables for valid values and results when it is unset or null.
  • EDITOR โ€” Used by the v command to select an editor. See the EXTENDED DESCRIPTION section.
  • LANG โ€” Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of POSIX.1โ€2017, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)
  • LC_ALL โ€” If set to a non-empty string value, override the values of all the other internationalization variables.
  • LC_COLLATE โ€” Determine the locale for the behavior of ranges, equivalence classes, and multi-character collating elements within regular expressions.
  • LC_CTYPE โ€” Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments and input files) and the behavior of character classes within regular expressions.
  • LC_MESSAGES โ€” Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error and informative messages written to standard output.
  • NLSPATH โ€” Determine the location of message catalogs for the processing of LC_MESSAGES.
  • LINES โ€” Override the system-selected vertical screen size, used as the number of lines in a screenful. See the Base Definitions volume of POSIX.1โ€2017, Chapter 8, Environment Variables for valid values and results when it is unset or null. The -n option shall take precedence over the LINES variable for determining the number of lines in a screenful. ๐Ÿ‘‘
  • MORE โ€” Determine a string containing options described in the OPTIONS section preceded with <hyphen-minus> characters and <blank>-separated as on the command line. Any command line options shall be processed after those in the MORE variable, as if the command line were:
more $MORE options operands

The MORE variable shall take precedence over the TERM and LINES variables for determining the number of lines in a screenful.

  • TERM โ€” Determine the name of the terminal type. If this variable is unset or null, an unspecified default terminal type is used.

โญ ASYNCHRONOUS EVENTS โญ

Default. Moving on bestie. ๐Ÿ’…


๐ŸŒธ STDOUT ๐ŸŒธ

The standard output shall be used to write the contents of the input files. That's its whole job. ๐ŸŽ€

โœจ STDERR โœจ

Okay so bestie, standard error is like the backstage pass ๐Ÿ’… โ€” it's where the drama goes. It shall be used for diagnostic messages and user commands (peep the INPUT FILES section for the deets), and if standard output is a terminal device, it's also where the prompting string gets written. That prompting string shall appear on the screen line below the last line of the file displayed in the current screenful. The prompt shall contain the name of the file currently being examined and shall contain an end-of-file indication and the name of the next file, if any, when prompting at the end-of-file. If an error or informational message is displayed, it is unspecified whether it is contained in the prompt. If it is not contained in the prompt, it shall be displayed and then the user shall be prompted for a continuation character, at which point another message or the user prompt may be displayed. The prompt is otherwise unspecified. It is unspecified whether informational messages are written for other user commands.


๐Ÿ“‚ OUTPUT FILES ๐Ÿ“‚

None. Like, literally none. Nada. ๐Ÿšซ


๐ŸŒˆ EXTENDED DESCRIPTION ๐ŸŒˆ

Alright, here's where it gets juicy. The following section describes the behavior of more when the standard output is a terminal device. If the standard output is not a terminal device, no options other than -s shall have any effect, and all input files shall be copied to standard output otherwise unmodified, at which time more shall exit without further action. So basically, if you pipe it, it's just a fancy cat with -s as the only mood. ๐Ÿ’โ€โ™€๏ธ

The number of lines available per screen shall be determined by the -n option, if present, or by examining values in the environment (see the ENVIRONMENT VARIABLES section). If neither method yields a number, an unspecified number of lines shall be used. Mystery number, spooky. ๐Ÿ‘ป

The maximum number of lines written shall be one less than this number, because the screen line after the last line written shall be used to write a user prompt and user input. If the number of lines in the screen is less than two, the results are undefined. It is unspecified whether user input is permitted to be longer than the remainder of the single line where the prompt has been written.

The number of columns available per line shall be determined by examining values in the environment (see the ENVIRONMENT VARIABLES section), with a default value as described in the Base Definitions volume of POSIX.1โ€2017, Chapter 8, Environment Variables.

Lines that are longer than the display shall be folded; the length at which folding occurs is unspecified, but should be appropriate for the output device. Folding may occur between glyphs of single characters that take up multiple display columns. So long lines get a little foldy makeover. ๐ŸŽ€

When standard output is a terminal and -u is not specified, more shall treat <backspace> and <carriage-return> characters specially:

  • A character, followed first by a sequence of n <backspace> characters (where n is the same as the number of column positions that the character occupies), then by n <underscore> characters ('_'), shall cause that character to be written as underlined text, if the terminal type supports that. The n <underscore> characters, followed first by n <backspace> characters, then any character with n column positions, shall also cause that character to be written as underlined text, if the terminal type supports that.
  • A sequence of n <backspace> characters (where n is the same as the number of column positions that the previous character occupies) that appears between two identical printable characters shall cause the first of those two characters to be written as emboldened text (that is, visually brighter, standout mode, or inverse-video mode), if the terminal type supports that, and the second to be discarded. Immediately subsequent occurrences of <backspace>/character pairs for that same character shall also be discarded. (For example, the sequence "a\ba\ba\ba" is interpreted as a single emboldened 'a'.) So like, a goes ๐Ÿ’ช and the rest get ghosted.
  • The more utility shall logically discard all other <backspace> characters from the line as well as the character which precedes them, if any. Bye bye, backspaces. ๐Ÿ‘‹
  • A <carriage-return> at the end of a line shall be ignored, rather than being written as a non-printable character, as described in the next paragraph. So CR at EOL gets the silent treatment.

It is implementation-defined how other non-printable characters are written. Implementations should use the same format that they use for the ex print command; see the OPTIONS section within the ed utility. It is unspecified whether a multi-column character shall be separated if it crosses a display line boundary; it shall not be discarded. The behavior is unspecified if the number of columns on the display is less than the number of columns any single character in the line being displayed would occupy.

When each new file is displayed (or redisplayed), more shall write the first screen of the file. Once the initial screen has been written, more shall prompt for a user command. If the execution of the user command results in a screen that has lines in common with the current screen, and the device has sufficient terminal capabilities, more shall scroll the screen; otherwise, it is unspecified whether the screen is scrolled or redrawn.

For all files but the last (including standard input if no file was specified, and for the last file as well, if the -e option was not specified), when more has written the last line in the file, more shall prompt for a user command. This prompt shall contain the name of the next file as well as an indication that more has reached end-of-file. If the user command is f, <control>โ€F, <space>, j, <newline>, d, <control>โ€D, or s, more shall display the next file. Otherwise, if displaying the last file, more shall exit. Otherwise, more shall execute the user command specified.

Several of the commands described in this section display a previous screen from the input stream. In the case that text is being taken from a non-rewindable stream, such as a pipe, it is implementation-defined how much backwards motion is supported. If a command cannot be executed because of a limitation on backwards motion, an error message to this effect shall be displayed, the current screen shall not change, and the user shall be prompted for another command. No take-backsies on pipes, bestie. ๐Ÿšซ

If a command cannot be performed because there are insufficient lines to display, more shall alert the terminal. If a command cannot be performed because there are insufficient lines to display or a / command fails: if the input is the standard input, the last screen in the file may be displayed; otherwise, the current file and screen shall not change, and the user shall be prompted for another command.

The interactive commands in the following sections shall be supported. Some commands can be preceded by a decimal integer, called count in the following descriptions. If not specified with the command, count shall default to 1. In the following descriptions, pattern is a basic regular expression, as described in the Base Definitions volume of POSIX.1โ€2017, Section 9.3, Basic Regular Expressions. The term examine'' is historical usage meaning open the file for viewing''; for example, more foo would be expressed as examining file foo.

In the following descriptions, unless otherwise specified, line is a line in the more display, not a line from the file being examined.

In the following descriptions, the current position refers to two things:

  1. The position of the current line on the screen
  2. The line number (in the file) of the current line on the screen

Usually, the line on the screen corresponding to the current position is the third line on the screen. If this is not possible (there are fewer than three lines to display or this is the first page of the file, or it is the last page of the file), then the current position is either the first or last line on the screen as described later.


๐Ÿ†˜ Help ๐Ÿ†˜

Synopsis:

h

Write a summary of these commands and other implementation-defined commands. The behavior shall be as if the more utility were executed with the -e option on a file that contained the summary information. The user shall be prompted as described earlier in this section when end-of-file is reached. If the user command is one of those specified to continue to the next file, more shall return to the file and screen state from which the h command was executed. So it's like a little help menu that doesn't lose your place. ๐Ÿ’–


โฉ Scroll Forward One Screenful โฉ

Synopsis:

[count]f
[count]<control>-F

Scroll forward count lines, with a default of one screenful. If count is more than the screen size, only the final screenful shall be written. Zoom zoom! ๐Ÿš€


โช Scroll Backward One Screenful โช

Synopsis:

[count]b
[count]<control>-B

Scroll backward count lines, with a default of one screenful (see the -n option). If count is more than the screen size, only the final screenful shall be written. Rewind time, bestie. โช


โฌ‡๏ธ Scroll Forward One Line โฌ‡๏ธ

Synopsis:

[count]<space>
[count]j
[count]<newline>

Scroll forward count lines. The default count for the <space> shall be one screenful; for j and <newline>, one line. The entire count lines shall be written, even if count is more than the screen size. Little baby steps or big leaps, you choose. ๐Ÿพ


โฌ†๏ธ Scroll Backward One Line โฌ†๏ธ

Synopsis:

[count]k

Scroll backward count lines. The entire count lines shall be written, even if count is more than the screen size. One line at a time, no cap. โฌ†๏ธ


๐Ÿฅ Scroll Forward One Half Screenful ๐Ÿฅ

Synopsis:

[count]d
[count]<control>-D

Scroll forward count lines, with a default of one half of the screen size. If count is specified, it shall become the new default for subsequent d, <control>โ€D, and u commands. Half measures, but make it fashion. ๐Ÿ’…


๐Ÿฆ˜ Skip Forward One Line ๐Ÿฆ˜

Synopsis:

[count]s

Display the screenful beginning with the line count lines after the last line on the current screen. If count would cause the current position to be such that less than one screenful would be written, the last screenful in the file shall be written. Skipping like a stone. ๐Ÿชจ


๐Ÿก Scroll Backward One Half Screenful ๐Ÿก

Synopsis:

[count]u
[count]<control>-U

Scroll backward count lines, with a default of one half of the screen size. If count is specified, it shall become the new default for subsequent d, <control>-D, u, and <control>-U commands. The entire count lines shall be written, even if count is more than the screen size. Half back, full vibe. ๐Ÿก


๐Ÿ Go to Beginning of File ๐Ÿ

Synopsis:

[count]g

Display the screenful beginning with line count. Back to the top, like a fresh page. ๐Ÿ


๐Ÿ”š Go to End-of-File ๐Ÿ”š

Synopsis:

[count]G

If count is specified, display the screenful beginning with the line count. Otherwise, display the last screenful of the file. The end, periodt. ๐Ÿ”š


๐Ÿ”„ Refresh the Screen ๐Ÿ”„

Synopsis:

r
<control>-L

Refresh the screen. Glow up, screen edition. โœจ


๐Ÿ—‘๏ธ Discard and Refresh ๐Ÿ—‘๏ธ

Synopsis:

R

Refresh the screen, discarding any buffered input. Okay but listen โ€” if the current file is non-seekable, buffered input shall not be discarded and the R command shall be equivalent to the r command. So yeah, no rewinding a stream that can't rewind. ๐ŸŒ€

Mark Position

Synopsis:

mletter

Mark the current position with the letter named by letter, where letter is one of the lowercase letters of the portable character set. ๐Ÿ“Œ Bestie, heads up: when a new file is examined, all marks may be lost. So don't get too attached.

Return to Mark

Synopsis:

'letter

Return to the position that was previously marked with the letter named by letter, making that line the current position. โœจ bookmark teleportation, we love to see it.

Return to Previous Position

Synopsis:

''

Return to the position from which the last large movement command was executed โ€” and a "large movement" is defined as any movement of more than a screenful of lines. If no such movements have been made, return to the beginning of the file. ๐Ÿซถ

Search Forward for Pattern

Synopsis:

[count]/[!]pattern<newline>

Display the screenful beginning with the countth line containing the pattern. The search shall start after the first line currently displayed. The null regular expression (/ followed by a <newline>) shall repeat the search using the previous regular expression, with a default count. If the character ! is included, the matching lines shall be those that do not contain the pattern. If no match is found for the pattern, a message to that effect shall be displayed. ๐Ÿ” slay, but make it search.

Search Backward for Pattern

Synopsis:

[count]?[!]pattern<newline>

Display the screenful beginning with the countth previous line containing the pattern. The search shall start on the last line before the first line currently displayed. The null regular expression (? followed by a <newline>) shall repeat the search using the previous regular expression, with a default count. If the character ! is included, matching lines shall be those that do not contain the pattern. If no match is found for the pattern, a message to that effect shall be displayed. ๐Ÿ’… going backwards, iconic behaviour.

Synopsis:

[count]n

Repeat the previous search for the countth line containing the last pattern โ€” or not containing the last pattern, if the previous search was /! or ?!. ๐Ÿ”

Repeat Search in Reverse

Synopsis:

[count]N

Repeat the search in the opposite direction of the previous search for the countth line containing the last pattern โ€” or not containing the last pattern, if the previous search was /! or ?!. ๐Ÿ˜ญ not the reverse search, but yes, we do that too.

Examine New File

Synopsis:

:e [filename]<newline>

Examine a new file. If the filename argument is not specified, the current file (see the :n and :p commands below) shall be re-examined. The filename shall be subjected to the process of shell word expansions (see Section 2.6, Word Expansions); if more than a single pathname results, the effects are unspecified. If filename is a <number-sign> (#), the previously examined file shall be re-examined. If filename is not accessible for any reason โ€” including that it is a non-seekable file โ€” an error message to this effect shall be displayed and the current file and screen shall not change. ๐ŸŒธ

Examine Next File

Synopsis:

[count]:n

Examine the next file. If a number count is specified, the countth next file shall be examined. If filename refers to a non-seekable file, the results are unspecified. โญ

Examine Previous File

Synopsis:

[count]:p

Examine the previous file. If a number count is specified, the countth previous file shall be examined. If filename refers to a non-seekable file, the results are unspecified. ๐ŸŽ€

Go to Tag

Synopsis:

:t tagstring<newline>

If the file containing the tag named by the tagstring argument is not the current file, examine the file, as if the :e command was executed with that file as the argument. Otherwise, or in addition, display the screenful beginning with the tag, as described for the -t option (see the OPTIONS section). If the ctags utility is not supported by the system, the use of :t produces undefined results. ๐Ÿ’€ yeah, don't.

Invoke Editor

Synopsis:

v

Invoke an editor to edit the current file being examined. If standard input is being examined, the results are unspecified. The name of the editor shall be taken from the environment variable EDITOR, or shall default to vi. If the last pathname component in EDITOR is either vi or ex, the editor shall be invoked with a -c linenumber command line argument, where linenumber is the line number of the file line containing the display line currently displayed as the first line of the screen. It is implementation-defined whether line-setting options are passed to editors other than vi and ex. ๐Ÿ‘‘

When the editor exits, more shall resume with the same file and screen as when the editor was invoked. ๐Ÿฆ‹ seamless, fr fr.

Display Position

Synopsis:

=
<control>-G

Write a message for which the information references the first byte of the line after the last line of the file on the screen. This message shall include the name of the file currently being examined, its number relative to the total number of files there are to examine, the line number in the file, the byte number and the total bytes in the file, and what percentage of the file precedes the current position. If more is reading from standard input, or the file is shorter than a single screen, the line number, the byte number, the total bytes, and the percentage need not be written. ๐Ÿ“Š

Quit

Synopsis:

q
:q
ZZ

Exit more. bye bestie ๐Ÿ’–


๐ŸŒˆ EXIT STATUS ๐ŸŒˆ

The following exit values shall be returned:

  • 0 โ€” Successful completion. โœจ
  • >0 โ€” An error occurred. ๐Ÿ˜ญ

๐Ÿ’€ CONSEQUENCES OF ERRORS ๐Ÿ’€

If an error is encountered accessing a file when using the :n command, more shall attempt to examine the next file in the argument list, but the final exit status shall be affected. If an error is encountered accessing a file via the :p command, more shall attempt to examine the previous file in the argument list, but the final exit status shall be affected. If an error is encountered accessing a file via the :e command, more shall remain in the current file and the final exit status shall not be affected. ๐Ÿซถ okay so :e is the forgiving one, noted.

The following sections are informative. ๐Ÿ“ (yes, that's the actual wording, don't come for me)


๐ŸŽ€ APPLICATION USAGE ๐ŸŽ€

When the standard output is not a terminal, only the -s filter-modification option is effective. This is based on historical practice. For example, a typical implementation of man pipes its output through more -s to squeeze excess white space for terminal users. When man is piped to lp, however, it is undesirable for this squeezing to happen. ๐ŸŒธ iykyk.


โญ EXAMPLES โญ

The -p allows arbitrary commands to be executed at the start of each file. Examples are:

more -p G file1 file2

Examine each file starting with its last screenful. ๐Ÿ”ฅ

more -p 100 file1 file2

Examine each file starting with line 100 in the current position (usually the third line, so line 98 would be the first line written). ๐Ÿ’…

more -p /100 file1 file2

Examine each file starting with the first line containing the string "100" in the current position. ๐Ÿฆ‹

๐ŸŒธ RATIONALE ๐ŸŒธ (the "why is it like this" tea โ˜•)

okay so bestie, storytime ๐Ÿ“– โ€” more was a thing in BSD and BSD-derived systems already, and the standards girlies picked it as the blueprint for the POSIX file display program because it was way more widely available than either the public-domain program less or pg, which is the pager System V shipped with. slay for portability ๐Ÿ’…

the 4.4 BSD more is the model for the features they picked out โœจ. it's almost fully upwards-compatible from the 4.3 BSD version that was in wide use, and it became more amenable for vi users. several features that originally came from various file editors, found in both less and pg, got added to this volume of POSIX.1โ€2017 because they proved extremely popular with users. iconic behavior fr fr ๐Ÿ‘‘

there are inconsistencies between more and vi and they come straight from historical practice, no cap. for example, the single-character commands h, f, b, and <space> are screen movers in more, but cursor movers in vi. these inconsistencies were maintained because cursor movements just aren't applicable to more, and the powerful functionality you get without using the control key justifies the differences. it's giving "we know, and we're keeping it" ๐Ÿ’€

the tags interface got included in a program that is not a text editor because it promotes another degree of consistent operation with vi. and it's conceivable that the paging environment of more would be superior for browsing source code files in some circumstances ๐Ÿ‘€

the operating mode referred to for block-mode terminals effectively adds a <newline> to each Synopsis line that currently has none. so for example, d<newline> would page one screenful ๐Ÿซถ. this mode could be triggered by a command line option, environment variable, or some other method. the details are not imposed by this volume of POSIX.1โ€2017 because there are so few systems known to support such terminals. nevertheless, it was considered that all systems should be able to support more given the exception cited for this small community of terminals โ€” because, in comparison to vi, the cursor movements are few and the command set is relatively amenable to the optional <newline> characters.

some versions of more provide a shell escaping mechanism similar to the ex ! command. the standard developers did not consider that necessary in a paginator, particularly given the wide acceptance of multiple window terminals and job control features. (they chose to retain such features in the editors and mailx because the shell interaction also gives you an opportunity to modify the editing buffer, which is not applicable to more.) so that's a no from the committee ๐Ÿ’…

the -p (position) option replaces the + command because of the Utility Syntax Guidelines. the +command option is no longer specified by POSIX.1โ€2008 but may be present in some implementations. in early proposals it took a pattern argument, but historical less provided the more general facility of a command. it would have been desirable to use the same -c as ex and vi, but the letter was already in use ๐Ÿ˜ญ (rip -c)

the text stating:

``from a non-rewindable stream ... implementations may limit the amount of backwards motion supported''

would allow an implementation that permitted no backwards motion beyond text already on the screen. it was not possible to require a minimum amount of backwards motion that would be effective for all conceivable device types. the implementation should allow the user to back up as far as possible, within device and reasonable memory allocation constraints. so like, back it up as much as you can, bestie ๐Ÿ”™

historically, non-printable characters were displayed using the ARPA standard mappings, which are as follows:

  1. Printable characters are left alone. periodt.
  2. Control characters less than \177 are represented as followed by the character offset from the '@' character in the ASCII map; for example, \007 is represented as 'G'.
  3. \177 is represented as followed by '?'.

the display of characters having their eighth bit set was less standard. existing implementations use hex (0x00), octal (\000), and a meta-bit display. (the latter displayed characters with their eighth bit set as the two characters "M-", followed by the seven-bit display as described previously.) the latter probably has the best claim to historical practice because it was used with the -v option of 4 BSD and 4 BSD-derived versions of the cat utility since 1980 โญ

no specific display format is required by POSIX.1โ€2008. implementations are encouraged to conform to historic practice in the absence of any strong reason to diverge. iykyk ๐Ÿงš


๐Ÿ”ฎ FUTURE DIRECTIONS ๐Ÿ”ฎ

None. ๐Ÿ’€ that's it. that's the whole section. nothing coming. we love a stable queen โœจ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

  • Chapter 2, Shell Command Language, ctags, ed, ex, vi
  • The Base Definitions volume of POSIX.1โ€2017, Chapter 8, Environment Variables, Section 9.2, Regular Expression General Requirements, Section 9.3, Basic Regular Expressions, Section 12.2, Utility Syntax Guidelines

portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. the original Standard can be obtained online at http://www.opengroup.org/unix/online.html ๐ŸŒˆ

any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html ๐Ÿ™ˆ


and that's the whole page bestie, we did it ๐ŸŽ€ this edition came from IEEE/The Open Group, dated 2017, and the page is MORE(1POSIX) โ€” go forth and page things responsibly ๐Ÿ’–โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from