Commit | Line | Data |
---|---|---|
2ec5f51d NW |
1 | .\" Copyright (c) 1988, 1990 The Regents of the University of California. |
2 | .\" Copyright (c) 1988 Mark Nudleman | |
15637ed4 RG |
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 | .\" | |
2ec5f51d | 33 | .\" @(#)more.1 5.15 (Berkeley) 7/29/91 |
15637ed4 | 34 | .\" |
2ec5f51d NW |
35 | .Dd July 29, 1991 |
36 | .Dt MORE 1 | |
37 | .Os | |
38 | .Sh NAME | |
39 | .Nm more | |
40 | .Nd file perusal filter for crt viewing | |
41 | .Sh SYNOPSIS | |
42 | .Nm more | |
43 | .Op Fl ceinus | |
44 | .Op Fl t Ar tag | |
45 | .Op Fl x Ar tabs | |
46 | .Op Fl / Ar pattern | |
47 | .Op Fl # | |
48 | .Op Ar | |
49 | .Sh DESCRIPTION | |
50 | .Nm More | |
51 | is a filter for paging through text one screenful at a time. It | |
52 | uses | |
53 | .Xr termcap 3 | |
54 | so it can run on a variety of terminals. There is even limited support | |
55 | for hardcopy terminals. (On a hardcopy terminal, lines which should be | |
56 | printed at the top of the screen are prefixed with an up-arrow.) | |
57 | .Ar File | |
58 | may be a single dash (``-''), implying stdin. | |
59 | .Sh OPTIONS | |
60 | Command line options are described below. | |
61 | Options are also taken from the environment variable | |
62 | .Ev MORE | |
63 | (make sure to precede them with a dash (``-'')) but command | |
64 | line options will override them. | |
65 | .Bl -tag -width flag | |
66 | .It Fl c | |
15637ed4 | 67 | Normally, |
2ec5f51d NW |
68 | .Nm more |
69 | will repaint the screen by scrolling from the bottom of the screen. | |
70 | If the | |
71 | .Fl c | |
72 | option is set, when | |
73 | .Nm more | |
74 | needs to change the entire display, it will paint from the top line down. | |
75 | .It Fl e | |
76 | Normally, if displaying a single file, | |
77 | .Nm more | |
78 | exits as soon as it reaches end-of-file. The | |
79 | .Fl e | |
80 | option tells more to | |
81 | exit if it reaches end-of-file twice without an intervening operation. | |
82 | If the file is shorter than a single screen | |
83 | .Nm more | |
84 | will exit at end-of-file regardless. | |
85 | .It Fl i | |
86 | The | |
87 | .Fl i | |
88 | option causes searches to ignore case; that is, | |
89 | uppercase and lowercase are considered identical. | |
90 | .It Fl n | |
91 | The | |
92 | .Fl n | |
93 | flag suppresses line numbers. | |
94 | The default (to use line numbers) may cause | |
95 | .Nm more | |
96 | to run more slowly in some cases, especially with a very large input file. | |
97 | Suppressing line numbers with the | |
98 | .Fl n | |
99 | flag will avoid this problem. | |
100 | Using line numbers means: the line number will be displayed in the | |
101 | .Cm = | |
102 | command, and the | |
103 | .Cm v | |
104 | command will pass the current line number to the editor. | |
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. For more information, see the | |
115 | .Xr ctags 1 | |
116 | command. | |
117 | .It Fl u | |
118 | By default, | |
119 | .Nm more | |
120 | treats backspaces and | |
121 | .Dv CR-LF | |
122 | sequences specially. Backspaces which appear | |
123 | adjacent to an underscore character are displayed as underlined text. | |
124 | Backspaces which appear between two identical characters are displayed | |
125 | as emboldened text. | |
126 | .Dv CR-LF | |
127 | sequences are compressed to a single linefeed | |
128 | character. The | |
129 | .Fl u | |
130 | option causes backspaces to always be displayed as | |
131 | control characters, i.e. as the two character sequence ``^H'', and | |
132 | .Dv CR-LF | |
133 | to be left alone. | |
134 | .It Fl x | |
135 | The | |
136 | .Fl x | |
137 | option sets tab stops every | |
138 | .Ar N | |
139 | positions. The default for | |
140 | .Ar N | |
141 | is 8. | |
142 | .It Fl / | |
143 | The | |
144 | .Fl / | |
145 | option specifies a string that will be searched for before | |
146 | each file is displayed. | |
147 | .Sh COMMANDS | |
148 | Interactive commands for | |
149 | .Nm more | |
150 | are based on | |
151 | .Xr vi 1 . | |
152 | Some commands may be preceeded by a decimal number, called N in the | |
153 | descriptions below. | |
154 | In the following descriptions, ^X means control-X. | |
155 | .Pp | |
156 | .Bl -tag -width Ic | |
157 | .It Ic h | |
158 | Help: display a summary of these commands. | |
159 | If you forget all the other commands, remember this one. | |
160 | .It Xo | |
161 | .Ic SPACE | |
162 | .No or | |
163 | .Ic f | |
164 | .No or | |
165 | .Ic \&^F | |
166 | .Xc | |
167 | Scroll forward N lines, default one window. | |
168 | If N is more than the screen size, only the final screenful is displayed. | |
169 | .It Ic b No or Ic \&^B | |
170 | Scroll backward N lines, default one window (see option -z below). | |
171 | If N is more than the screen size, only the final screenful is displayed. | |
172 | .It Ic j No or Ic RETURN | |
173 | Scroll forward N lines, default 1. | |
174 | The entire N lines are displayed, even if N is more than the screen size. | |
175 | .It Ic k | |
176 | Scroll backward N lines, default 1. | |
177 | The entire N lines are displayed, even if N is more than the screen size. | |
178 | .It Ic d No or Ic \&^D | |
179 | Scroll forward N lines, default one half of the screen size. | |
180 | If N is specified, it becomes the new default for | |
181 | subsequent d and u commands. | |
182 | .It Ic u No or Ic \&^U | |
183 | Scroll backward N lines, default one half of the screen size. | |
184 | If N is specified, it becomes the new default for | |
185 | subsequent d and u commands. | |
186 | .It Ic g | |
187 | Go to line N in the file, default 1 (beginning of file). | |
188 | .It Ic G | |
189 | Go to line N in the file, default the end of the file. | |
190 | .It Ic p No or Ic \&% | |
191 | Go to a position N percent into the file. N should be between 0 | |
192 | and 100. (This works if standard input is being read, but only if | |
193 | .Nm more | |
194 | has already read to the end of the file. It is always fast, but | |
195 | not always useful.) | |
196 | .It Ic r No or Ic \&^L | |
197 | Repaint the screen. | |
198 | .It Ic R | |
199 | Repaint the screen, discarding any buffered input. | |
200 | Useful if the file is changing while it is being viewed. | |
201 | .It Ic m | |
202 | Followed by any lowercase letter, | |
203 | marks the current position with that letter. | |
204 | .It Ic \&' | |
205 | (Single quote.) | |
206 | Followed by any lowercase letter, returns to the position which | |
207 | was previously marked with that letter. | |
208 | Followed by another single quote, returns to the postion at | |
209 | which the last "large" movement command was executed, or the | |
210 | beginning of the file if no such movements have occurred. | |
211 | All marks are lost when a new file is examined. | |
9368ffc5 AM |
212 | .It Ic \&! Ns Ar command |
213 | Invoke a shell command. The characters `%', `#', and `!' | |
214 | are replaced by the current file name, previous filename | |
215 | and previous shell command, respectively. If there is no | |
216 | current or previous filename, `%' and `#' are not expanded. | |
217 | `\%' `\#' and `\!' are replaced by `%', `#' and `!', | |
218 | respectively. | |
2ec5f51d NW |
219 | .It Ic \&/ Ns Ar pattern |
220 | Search forward in the file for the N-th line containing the pattern. | |
221 | N defaults to 1. | |
222 | The pattern is a regular expression, as recognized by | |
223 | .Xr ed . | |
224 | The search starts at the second line displayed. | |
225 | .It Ic \&? Ns Ar pattern | |
226 | Search backward in the file for the N-th line containing the pattern. | |
227 | The search starts at the line immediately before the top line displayed. | |
228 | .It Ic \&/\&! Ns Ar pattern | |
229 | Like /, but the search is for the N-th line | |
230 | which does NOT contain the pattern. | |
231 | .It Ic \&?\&! Ns Ar pattern | |
232 | Like ?, but the search is for the N-th line | |
233 | which does NOT contain the pattern. | |
234 | .It Ic n | |
235 | Repeat previous search, for N-th line containing the last pattern | |
236 | (or | |
237 | .Tn NOT | |
238 | containing the last pattern, if the previous search | |
239 | was /! or ?!). | |
240 | .It Ic E Ns Op Ar filename | |
241 | Examine a new file. | |
242 | If the filename is missing, the "current" file (see the N and P commands | |
243 | below) from the list of files in the command line is re-examined. | |
244 | If the filename is a pound sign (#), the previously examined file is | |
245 | re-examined. | |
246 | .It Ic N No or Ic \&:n | |
247 | Examine the next file (from the list of files given in the command line). | |
248 | If a number N is specified (not to be confused with the command N), | |
249 | the N-th next file is examined. | |
250 | .It Ic P No or Ic \&:p | |
251 | Examine the previous file. | |
252 | If a number N is specified, the N-th previous file is examined. | |
253 | .It Ic \&:t | |
254 | Go to supplied tag. | |
255 | .It Ic v | |
256 | Invokes an editor to edit the current file being viewed. | |
257 | The editor is taken from the environment variable | |
258 | .Ev EDITOR , | |
259 | or defaults to | |
260 | .Xr vi 1 . | |
261 | .It Ic \&= No or Ic \&^G | |
262 | These options print out the number of the file currently being displayed | |
263 | relative to the total number of files there are to display, the current | |
264 | line number, the current byte number and the total bytes to display, and | |
265 | what percentage of the file has been displayed. If | |
266 | .Nm more | |
267 | is reading from stdin, or the file is shorter than a single screen, some | |
268 | of these items may not be available. Note, all of these items reference | |
269 | the first byte of the last line displayed on the screen. | |
270 | .It Xo | |
271 | .Ic q | |
272 | .No or | |
273 | .Ic \&:q | |
274 | .No or | |
275 | .Ic ZZ | |
276 | .Xc | |
277 | Exits | |
278 | .Nm more . | |
279 | .El | |
280 | .Sh ENVIRONMENT | |
281 | .Nm More | |
282 | utilizes the following environment variables, if they exist: | |
283 | .Bl -tag -width Fl | |
284 | .It Ev MORE | |
285 | This variable may be set with favored options to | |
286 | .Nm more . | |
287 | .It Ev EDITOR | |
288 | Specify default editor. | |
289 | .It Ev SHELL | |
290 | Current shell in use (normally set by the shell at login time). | |
291 | .It Ev TERM | |
292 | Specifies terminal type, used by more to get the terminal | |
293 | characteristics necessary to manipulate the screen. | |
294 | .El | |
295 | .Sh SEE ALSO | |
296 | .Xr ctags 1 , | |
297 | .Xr vi 1 | |
298 | .Sh AUTHOR | |
299 | This software is derived from software contributed to Berkeley | |
300 | by Mark Nudleman. | |
301 | .Sh HISTORY | |
302 | The | |
303 | .Nm more | |
304 | command appeared in | |
305 | .Bx 3.0 . |