6 yap, more \- yet another pager
11 .RB [ +\fIcommand\fP ]
15 is a program allowing the user to examine a continuous text one screenful at
16 a time on a video display terminal.
18 pausing after each screenful, waiting for the user to type a command.
19 The commands are enumerated later.
21 main feature is, that it can page both forwards and backwards,
22 even when reading from standard input.
24 The command line options are:
27 An integer which is the size (in lines) of a page (the initial
33 will display each page by beginning at the top of the screen and erasing
34 each line just before it displays on it. If your terminal cannot erase a line,
36 will clear the screen before it displays a page.
38 This avoids scrolling the screen, making it easier to read while
45 to scroll the screen instead of beginning at the top of the screen.
46 This is also done if your terminal cannot either erase a line or clear the
52 handles underlining such as produced by nroff in a manner appropriate
53 to the particular terminal: if the terminal can perform underlining well
54 (t.i., the escape sequences for underlining do not occupy space on the
57 will underline underlined information in the input. The
59 option supresses this underlining.
64 also recognises escape sequences for stand-out mode or underlining mode
65 in the input, and knows how much space these escape sequences will
66 occupy on the screen, so that
68 will not fold lines erroneously.
71 option supresses this pattern matching.
74 This option will cause
76 to exit only on the "quit" command.
79 \fIcommand\fP is taken to be an initial command to
87 For instance, if you prefer the
89 mode of operation, just set the
91 environment variable to
96 can be bound to sequences of keystrokes.
97 The environment variable
99 may contain the bindings in the
100 form of a list of colon-separated `name=sequence' pairs.
103 is a short mnemonic for the command, the
105 is the sequence of keystrokes to be typed to invoke the command.
106 This sequence may contain a ^X escape, which means control-X,
107 and a \\X escape, which means X. The latter can be used to get
108 the characters `^', `\\' and `:' in the sequence.
109 There are two keymaps available, the default one and a user-defined one.
110 You can switch between one and the other with the
116 commands are described below.
117 The mnemonics for the commands are given in parentheses. The default
118 key sequences (if any) are given after the mnemonic.
119 Every command takes an optional integer argument, which may be typed
120 before the command. Some commands just ignore it. The integer argument
125 is not given, it defaults to 1.
137 .Nc "visit previous file" bf P
140 previous file given in the command line.
142 .Nc "scroll one line up or go to line" bl "^K ~or~ k"
145 is not given, scroll one line up. Otherwise,
147 will be interpreted as a line number. A page starting with the line
148 indicated will then be displayed.
150 .Nc "bottom" bot "l ~or~ $"
151 Go to the last line of the input.
153 .Nc "display previous page" bp -
154 Display the previous page, consisting of
158 lines if no argument is given).
160 .Nc "display previous page and set pagesize" bps Z
161 Display the previous page, consisting of
165 lines if no argument is given).
173 .Nc "scroll up" bs ^B
180 is not given. Initially, the
184 .Nc "search backwards for pattern" bse ?
185 Search backwards for the
187 occurrence of a regular expression which will be prompted for.
188 If there are less than
190 occurrences of the expression, the position in the file remains unchanged.
191 Otherwise, a page is displayed, starting two lines before the place where the
192 expression was found. The user's erase and kill characters may be used
193 to edit the expression.
194 Erasing back past the first character cancels the search command.
196 Note: Some systems do not have
198 On those systems, searches are still supported, but regular expressions
201 .Nc "skip lines backwards" bsl S
204 lines backwards and display a page.
206 .Nc "skip pages backwards" bsp F
209 pages backwards and display a page.
211 .Nc "scroll up and set scrollsize" bss b
226 .Nc "change key map" chm X
227 Change from the current key map to the other (if there is one).
229 .Nc "exchange current page and mark" exg x
230 Set the mark to the current page, and display the previously marked
233 .Nc "visit next file" ff N
236 next file given in the command line.
238 .Nc "scroll one line down or go to line" fl "^J ~or~ ^M ~or~ j"
241 is not given, scroll one line down. Otherwise,
243 will be interpreted as a line number. A page starting with the line
244 indicated will then be displayed.
246 .Nc "display next page" fp <space>
247 Display the next page, consisting of
251 lines if no argument is given).
253 .Nc "display next page and set pagesize" fps z
254 Display the next page, consisting of
258 lines if no argument is given).
266 .Nc "scroll down" fs ^D
271 lines if no argument is given).
273 .Nc "search forwards for pattern" fse /
274 Search forwards for the
276 occurrence of a regular expression which will be prompted for.
277 If there are less than
279 occurrences of the expression, the position in the file remains unchanged.
280 Otherwise, a page is displayed, starting two lines before the place where the
281 expression was found. The user's erase and kill characters may be used
282 to edit the expression.
283 Erasing back past the first character cancels the search command.
285 Note: Some systems do not have
287 On those systems, searches are still supported, but regular expressions
290 .Nc "skip lines forwards" fsl s
293 lines and display a page.
295 .Nc "skip pages forwards" fsp f
298 pages and display a page.
300 .Nc "scroll down and set scrollsize" fss d
316 Give a short description of all commands that are bound to a key sequence.
318 .Nc "set a mark" mar m
319 Set a mark on the current page.
321 .Nc "repeat last search" nse n
324 occurrence of the last regular expression entered, in the direction of the
327 .Nc "repeat last search in other direction" nsr r
330 occurrence of the last regular expression entered, but in the other direction.
332 .Nc "quit" qui "Q ~or~ q"
337 Redraw the current page.
340 Repeat the last command. This does not always make sense, so not all
341 commands can be repeated.
343 .Nc "shell escape" shl !
344 Invoke the shell with a command that will be prompted for.
345 In the command, the characters `%' and `!' are replaced with the
346 current file name and the previous shell command respectively.
347 The sequences `\\%' and `\\!' are replaced by `%' and `!' respectively.
348 The user's erase and kill characters can be used to edit the command.
349 Erasing back past the first character cancels the command.
351 .Nc "pipe to shell command" pip |
352 Pipe the current input file into a shell command that will be prompted for.
353 The comments given in the description of the shell escape command apply here
356 .Nc "go to mark" tom '
357 Display the marked page.
360 Display a page starting with the first line of the input.
362 .Nc "visit file" vis e
363 Visit a new file. The filename will be prompted for. If you just
364 type a return, the current file is revisited.
366 .Nc "write input to a file" wrf w
367 Write the input to a file, whose name will be prompted for.
370 The commands take effect immediately, i.e., it is not necessary to
371 type a carriage return.
372 Up to the time when the command sequence itself is given,
373 the user may give an interrupt to cancel the command
381 will find your terminal very stupid and act like it,
382 if it has no way of placing the
383 cursor on the home position, or cannot either
387 In lines longer than about 2000 characters, a linefeed is silently inserted.
389 The percentage, given in the prompt when
391 reads from a file (and knows it), is not always very accurate.