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