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

Annotation of src/usr.bin/less/more.1, Revision 1.1

1.1     ! millert     1: .\"    $OpenBSD$
        !             2: .\"
        !             3: .\" Copyright (c) 1988, 1990, 1993
        !             4: .\"    The Regents of the University of California.  All rights reserved.
        !             5: .\"
        !             6: .\" Redistribution and use in source and binary forms, with or without
        !             7: .\" modification, are permitted provided that the following conditions
        !             8: .\" are met:
        !             9: .\" 1. Redistributions of source code must retain the above copyright
        !            10: .\"    notice, this list of conditions and the following disclaimer.
        !            11: .\" 2. Redistributions in binary form must reproduce the above copyright
        !            12: .\"    notice, this list of conditions and the following disclaimer in the
        !            13: .\"    documentation and/or other materials provided with the distribution.
        !            14: .\" 3. Neither the name of the University nor the names of its contributors
        !            15: .\"    may be used to endorse or promote products derived from this software
        !            16: .\"    without specific prior written permission.
        !            17: .\"
        !            18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
        !            19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        !            20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        !            21: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
        !            22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        !            23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        !            24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            28: .\" SUCH DAMAGE.
        !            29: .\"
        !            30: .\"    @(#)more.1      8.2 (Berkeley) 4/18/94
        !            31: .\"
        !            32: .Dd $Mdocdate$
        !            33: .Dt MORE 1
        !            34: .Os
        !            35: .Sh NAME
        !            36: .Nm more
        !            37: .Nd file perusal filter for crt viewing
        !            38: .Sh SYNOPSIS
        !            39: .Nm more
        !            40: .Op Fl ceisu
        !            41: .Op Fl n Ar number
        !            42: .Op Fl p Ar command
        !            43: .Op Fl t Ar tag
        !            44: .Op Ar
        !            45: .Sh DESCRIPTION
        !            46: .Nm more
        !            47: is a filter for paging through text one screenful at a time.
        !            48: It uses
        !            49: .Xr terminfo 3
        !            50: so it can run on a variety of terminals.
        !            51: There is even limited support for hardcopy terminals.
        !            52: (On a hardcopy terminal, lines which should be
        !            53: printed at the top of the screen are prefixed with an up-arrow.)
        !            54: If no
        !            55: .Ar file
        !            56: is specified, or if
        !            57: .Ar file
        !            58: is a single dash
        !            59: .Pq Ql - ,
        !            60: the standard input is used.
        !            61: .Pp
        !            62: The options are as follows:
        !            63: .Bl -tag -width Ds
        !            64: .It Fl c
        !            65: Normally,
        !            66: .Nm
        !            67: will repaint the screen by scrolling from the bottom of the screen.
        !            68: If the
        !            69: .Fl c
        !            70: option is set, when
        !            71: .Nm
        !            72: needs to change the entire display, it will paint from the top line down.
        !            73: .It Fl e
        !            74: Normally, if displaying a single file,
        !            75: .Nm
        !            76: exits as soon as it reaches end-of-file.
        !            77: The
        !            78: .Fl e
        !            79: option tells more to
        !            80: exit if it reaches end-of-file twice without an intervening operation.
        !            81: If the file is shorter than a single screen
        !            82: .Nm
        !            83: will exit at end-of-file regardless.
        !            84: .It Fl i
        !            85: The
        !            86: .Fl i
        !            87: option causes searches to ignore case; that is,
        !            88: uppercase and lowercase are considered identical.
        !            89: .It Fl n Ar number
        !            90: The
        !            91: .Fl n
        !            92: option causes
        !            93: .Nm
        !            94: to page
        !            95: .Ar number
        !            96: of lines per screenful.
        !            97: By default,
        !            98: .Nm
        !            99: will use the terminal window size.
        !           100: .It Fl p Ar command
        !           101: Execute the specified
        !           102: .Nm
        !           103: .Ar command
        !           104: when the file is first opened.
        !           105: .It Fl s
        !           106: The
        !           107: .Fl s
        !           108: option causes
        !           109: consecutive blank lines to be squeezed into a single blank line.
        !           110: .It Fl t
        !           111: The
        !           112: .Fl t
        !           113: option, followed immediately by a tag, will edit the file
        !           114: containing that tag.
        !           115: For more information, see the
        !           116: .Xr ctags  1
        !           117: command.
        !           118: .It Fl u
        !           119: By default,
        !           120: .Nm
        !           121: treats backspaces and
        !           122: .Dv CR-LF
        !           123: sequences specially.
        !           124: Backspaces which appear adjacent to an underscore character are
        !           125: displayed as underlined text.
        !           126: Backspaces which appear between two identical characters are displayed
        !           127: as emboldened text.
        !           128: .Dv CR-LF
        !           129: sequences are compressed to a single linefeed
        !           130: character.
        !           131: The
        !           132: .Fl u
        !           133: option causes backspaces to always be displayed as
        !           134: control characters, i.e. as the two character sequence
        !           135: .Sq ^H ,
        !           136: and
        !           137: .Dv CR-LF
        !           138: to be left alone.
        !           139: .Sh COMMANDS
        !           140: Interactive commands for
        !           141: .Nm
        !           142: are based on
        !           143: .Xr vi  1  .
        !           144: Some commands may be preceded by a decimal number, called N in the
        !           145: descriptions below.
        !           146: In the following descriptions, ^X means control-X.
        !           147: .Pp
        !           148: .Bl -tag -width Ic
        !           149: .It Ic h
        !           150: Help: display a summary of these commands.
        !           151: If you forget all the other commands, remember this one.
        !           152: .It Xo
        !           153: .Ic SPACE
        !           154: .No or
        !           155: .Ic f
        !           156: .No or
        !           157: .Ic \&^F
        !           158: .Xc
        !           159: Scroll forward N lines, default one window.
        !           160: If N is more than the screen size, only the final screenful is displayed.
        !           161: .It Ic b No or Ic \&^B
        !           162: Scroll backward N lines, default one window (see option -z below).
        !           163: If N is more than the screen size, only the final screenful is displayed.
        !           164: .It Ic j No or Ic RETURN
        !           165: Scroll forward N lines, default 1.
        !           166: The entire N lines are displayed, even if N is more than the screen size.
        !           167: .It Ic k
        !           168: Scroll backward N lines, default 1.
        !           169: The entire N lines are displayed, even if N is more than the screen size.
        !           170: .It Ic d No or Ic \&^D
        !           171: Scroll forward N lines, default one half of the screen size.
        !           172: If N is specified, it becomes the new default for
        !           173: subsequent d and u commands.
        !           174: .It Ic u No or Ic \&^U
        !           175: Scroll backward N lines, default one half of the screen size.
        !           176: If N is specified, it becomes the new default for
        !           177: subsequent d and u commands.
        !           178: .It Ic g
        !           179: Go to line N in the file, default 1 (beginning of file).
        !           180: .It Ic G
        !           181: Go to line N in the file, default the end of the file.
        !           182: .It Ic p No or Ic \&%
        !           183: Go to a position N percent into the file.
        !           184: N should be between 0 and 100.
        !           185: (This works if standard input is being read, but only if
        !           186: .Nm
        !           187: has already read to the end of the file.
        !           188: It is always fast, but not always useful.)
        !           189: .It Ic r No or Ic \&^L
        !           190: Repaint the screen.
        !           191: .It Ic R
        !           192: Repaint the screen, discarding any buffered input.
        !           193: Useful if the file is changing while it is being viewed.
        !           194: .It Ic m
        !           195: Followed by any lowercase letter,
        !           196: marks the current position with that letter.
        !           197: .It Ic \&'
        !           198: (Single quote.)
        !           199: Followed by any lowercase letter, returns to the position which
        !           200: was previously marked with that letter.
        !           201: Followed by another single quote, returns to the position at
        !           202: which the last "large" movement command was executed, or the
        !           203: beginning of the file if no such movements have occurred.
        !           204: All marks are lost when a new file is examined.
        !           205: .It Ic \&/ Ns Ar pattern
        !           206: Search forward in the file for the N-th line containing the pattern.
        !           207: N defaults to 1.
        !           208: The pattern is a regular expression, as recognized by
        !           209: .Xr ed .
        !           210: The search starts at the second line displayed.
        !           211: .It Ic \&? Ns Ar pattern
        !           212: Search backward in the file for the N-th line containing the pattern.
        !           213: The search starts at the line immediately before the top line displayed.
        !           214: .It Ic \&/\&! Ns Ar pattern
        !           215: Like /, but the search is for the N-th line
        !           216: which does NOT contain the pattern.
        !           217: .It Ic \&?\&! Ns Ar pattern
        !           218: Like ?, but the search is for the N-th line
        !           219: which does NOT contain the pattern.
        !           220: .It Ic n
        !           221: Repeat previous search, for N-th line containing the last pattern
        !           222: (or
        !           223: .Tn NOT
        !           224: containing the last pattern, if the previous search
        !           225: was /! or ?!).
        !           226: .It Ic N
        !           227: Repeat previous search in the opposite direction,
        !           228: for N-th line containing the last pattern (or
        !           229: .Tn NOT
        !           230: containing the last pattern, if the previous search
        !           231: was /! or ?!).
        !           232: .It Ic E Ns Op Ar filename
        !           233: Examine a new file.
        !           234: If the filename is missing, the "current" file (see the N and P commands
        !           235: below) from the list of files in the command line is re-examined.
        !           236: If the filename is a pound sign (#), the previously examined file is
        !           237: re-examined.
        !           238: .It Ic \&:n
        !           239: Examine the next file (from the list of files given in the command line).
        !           240: If a number N is specified (not to be confused with the command N),
        !           241: the N-th next file is examined.
        !           242: .It Ic P No or Ic \&:p
        !           243: Examine the previous file.
        !           244: If a number N is specified, the N-th previous file is examined.
        !           245: .It Ic \&:t
        !           246: Go to supplied tag.
        !           247: .It Ic v
        !           248: Invokes an editor to edit the current file being viewed.
        !           249: The editor is taken from the environment variable
        !           250: .Ev EDITOR ,
        !           251: or defaults to
        !           252: .Xr vi  1  .
        !           253: .It Ic \&= No or Ic \&^G
        !           254: These options print out the number of the file currently being displayed
        !           255: relative to the total number of files there are to display, the current
        !           256: line number, the current byte number and the total bytes to display, and
        !           257: what percentage of the file has been displayed.
        !           258: If
        !           259: .Nm
        !           260: is reading from the standard input,
        !           261: or the file is shorter than a single screen, some
        !           262: of these items may not be available.
        !           263: Note, all of these items reference the first byte of the last line
        !           264: displayed on the screen.
        !           265: .It Xo
        !           266: .Ic q
        !           267: .No or
        !           268: .Ic \&:q
        !           269: .No or
        !           270: .Ic ZZ
        !           271: .Xc
        !           272: Exits
        !           273: .Nm .
        !           274: .El
        !           275: .Sh ENVIRONMENT
        !           276: .Nm
        !           277: utilizes the following environment variables, if they exist:
        !           278: .Bl -tag -width Fl
        !           279: .It Ev EDITOR
        !           280: The default editor if
        !           281: .Ev VISUAL
        !           282: is not set.
        !           283: If neither
        !           284: .Ev VISUAL
        !           285: nor
        !           286: .Ev EDITOR
        !           287: are set,
        !           288: .Xr vi 1
        !           289: is used.
        !           290: .It Ev MORE
        !           291: Default command line options to use with
        !           292: .Nm .
        !           293: The options should be space-separated and must be prefixed with a dash
        !           294: .Pq Ql - .
        !           295: .It Ev SHELL
        !           296: Current shell in use (normally set by the shell at login time).
        !           297: .It Ev TERM
        !           298: Specifies terminal type, used by more to get the terminal
        !           299: characteristics necessary to manipulate the screen.
        !           300: .It Ev VISUAL
        !           301: Specify default editor.
        !           302: .El
        !           303: .Sh SEE ALSO
        !           304: .Xr ctags 1 ,
        !           305: .Xr less 1 ,
        !           306: .Xr vi 1
        !           307: .Sh STANDARDS
        !           308: The
        !           309: .Nm
        !           310: utility is compliant with the
        !           311: .St -p1003.1-2008
        !           312: specification,
        !           313: though its presence is optional.
        !           314: .Pp
        !           315: This version of the
        !           316: .Nm
        !           317: utility is actually
        !           318: .Xr less 1
        !           319: in disguise.
        !           320: As such, it will also accept options documented in
        !           321: .Xr less 1 .
        !           322: .Pp
        !           323: Behavior for the
        !           324: .Fl e
        !           325: and
        !           326: .Fl p
        !           327: flags differs between this implementation and
        !           328: .St -p1003.1-2008 .
        !           329: The
        !           330: .Sq s
        !           331: command also has a different meaning.
        !           332: .Sh AUTHORS
        !           333: .An Mark Nudelman Aq Mt markn@greenwoodsoftware.com
        !           334: .Sh HISTORY
        !           335: A
        !           336: .Nm
        !           337: command appeared in
        !           338: .Bx 3.0 .