[9] | 1 | .\" $Header: /cvsup/minix/src/man/man1/yap.1,v 1.1 2005/05/02 13:01:39 beng Exp $
|
---|
| 2 | .\" nroff -man yap.1
|
---|
| 3 | .tr ~
|
---|
| 4 | .TH YAP 1 local
|
---|
| 5 | .SH NAME
|
---|
| 6 | yap, more \- yet another pager
|
---|
| 7 | .SH SYNOPSIS
|
---|
| 8 | .B yap
|
---|
| 9 | .RB [ \-cnuq ]
|
---|
| 10 | .RB [ \-\fIn\fP ]
|
---|
| 11 | .RB [ +\fIcommand\fP ]
|
---|
| 12 | .RI [ file " ...]"
|
---|
| 13 | .SH DESCRIPTION
|
---|
| 14 | .B Yap
|
---|
| 15 | is a program allowing the user to examine a continuous text one screenful at
|
---|
| 16 | a time on a video display terminal.
|
---|
| 17 | It does so by
|
---|
| 18 | pausing after each screenful, waiting for the user to type a command.
|
---|
| 19 | The commands are enumerated later.
|
---|
| 20 | .BR Yap 's
|
---|
| 21 | main feature is, that it can page both forwards and backwards,
|
---|
| 22 | even when reading from standard input.
|
---|
| 23 | .PP
|
---|
| 24 | The command line options are:
|
---|
| 25 | .TP
|
---|
| 26 | .I \-n
|
---|
| 27 | An integer which is the size (in lines) of a page (the initial
|
---|
| 28 | .IR page-size .
|
---|
| 29 | .TP
|
---|
| 30 | .B \-c
|
---|
| 31 | Normally,
|
---|
| 32 | .B yap
|
---|
| 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,
|
---|
| 35 | .B yap
|
---|
| 36 | will clear the screen before it displays a page.
|
---|
| 37 | .br
|
---|
| 38 | This avoids scrolling the screen, making it easier to read while
|
---|
| 39 | .B yap
|
---|
| 40 | is writing.
|
---|
| 41 | The
|
---|
| 42 | .B -c
|
---|
| 43 | option causes
|
---|
| 44 | .B yap
|
---|
| 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
|
---|
| 47 | screen.
|
---|
| 48 | .TP
|
---|
| 49 | .B \-u
|
---|
| 50 | Normally,
|
---|
| 51 | .B yap
|
---|
| 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
|
---|
| 55 | screen),
|
---|
| 56 | .B yap
|
---|
| 57 | will underline underlined information in the input. The
|
---|
| 58 | .B -u
|
---|
| 59 | option supresses this underlining.
|
---|
| 60 | .TP
|
---|
| 61 | .B \-n
|
---|
| 62 | Normally,
|
---|
| 63 | .B yap
|
---|
| 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
|
---|
| 67 | .B yap
|
---|
| 68 | will not fold lines erroneously.
|
---|
| 69 | The
|
---|
| 70 | .B -n
|
---|
| 71 | option supresses this pattern matching.
|
---|
| 72 | .TP
|
---|
| 73 | .B \-q
|
---|
| 74 | This option will cause
|
---|
| 75 | .B yap
|
---|
| 76 | to exit only on the "quit" command.
|
---|
| 77 | .TP
|
---|
| 78 | .BI + command
|
---|
| 79 | \fIcommand\fP is taken to be an initial command to
|
---|
| 80 | .BR yap .
|
---|
| 81 | .PP
|
---|
| 82 | .B Yap
|
---|
| 83 | looks in the
|
---|
| 84 | .B YAP
|
---|
| 85 | environment variable
|
---|
| 86 | to pre-set flags.
|
---|
| 87 | For instance, if you prefer the
|
---|
| 88 | .B -c
|
---|
| 89 | mode of operation, just set the
|
---|
| 90 | .B YAP
|
---|
| 91 | environment variable to
|
---|
| 92 | .BR -c .
|
---|
| 93 | .PP
|
---|
| 94 | The commands of
|
---|
| 95 | .B yap
|
---|
| 96 | can be bound to sequences of keystrokes.
|
---|
| 97 | The environment variable
|
---|
| 98 | .B YAPKEYS
|
---|
| 99 | may contain the bindings in the
|
---|
| 100 | form of a list of colon-separated `name=sequence' pairs.
|
---|
| 101 | The
|
---|
| 102 | .I name
|
---|
| 103 | is a short mnemonic for the command, the
|
---|
| 104 | .I sequence
|
---|
| 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
|
---|
| 111 | .I change keymap
|
---|
| 112 | command.
|
---|
| 113 | .PP
|
---|
| 114 | The
|
---|
| 115 | .B yap
|
---|
| 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
|
---|
| 121 | is referred to as
|
---|
| 122 | .IR i .
|
---|
| 123 | Usually, if
|
---|
| 124 | .I i
|
---|
| 125 | is not given, it defaults to 1.
|
---|
| 126 | .de Nc
|
---|
| 127 | .PP
|
---|
| 128 | \&\\$1
|
---|
| 129 | .RI ( \\$2 )
|
---|
| 130 | .BR \\$3
|
---|
| 131 | .br
|
---|
| 132 | .RS
|
---|
| 133 | ..
|
---|
| 134 | .de Ec
|
---|
| 135 | .RE
|
---|
| 136 | ..
|
---|
| 137 | .Nc "visit previous file" bf P
|
---|
| 138 | Visit the
|
---|
| 139 | .IR i -th
|
---|
| 140 | previous file given in the command line.
|
---|
| 141 | .Ec
|
---|
| 142 | .Nc "scroll one line up or go to line" bl "^K ~or~ k"
|
---|
| 143 | If
|
---|
| 144 | .I i
|
---|
| 145 | is not given, scroll one line up. Otherwise,
|
---|
| 146 | .I i
|
---|
| 147 | will be interpreted as a line number. A page starting with the line
|
---|
| 148 | indicated will then be displayed.
|
---|
| 149 | .Ec
|
---|
| 150 | .Nc "bottom" bot "l ~or~ $"
|
---|
| 151 | Go to the last line of the input.
|
---|
| 152 | .Ec
|
---|
| 153 | .Nc "display previous page" bp -
|
---|
| 154 | Display the previous page, consisting of
|
---|
| 155 | .I i
|
---|
| 156 | lines, (or
|
---|
| 157 | .I page-size
|
---|
| 158 | lines if no argument is given).
|
---|
| 159 | .Ec
|
---|
| 160 | .Nc "display previous page and set pagesize" bps Z
|
---|
| 161 | Display the previous page, consisting of
|
---|
| 162 | .I i
|
---|
| 163 | lines, (or
|
---|
| 164 | .I page-size
|
---|
| 165 | lines if no argument is given).
|
---|
| 166 | If
|
---|
| 167 | .I i
|
---|
| 168 | is given, the
|
---|
| 169 | .I page-size
|
---|
| 170 | is set to
|
---|
| 171 | .IR i .
|
---|
| 172 | .Ec
|
---|
| 173 | .Nc "scroll up" bs ^B
|
---|
| 174 | Scroll up
|
---|
| 175 | .I i
|
---|
| 176 | lines (or
|
---|
| 177 | .I scroll-size
|
---|
| 178 | lines if
|
---|
| 179 | .I i
|
---|
| 180 | is not given. Initially, the
|
---|
| 181 | .I scroll-size
|
---|
| 182 | is 11).
|
---|
| 183 | .Ec
|
---|
| 184 | .Nc "search backwards for pattern" bse ?
|
---|
| 185 | Search backwards for the
|
---|
| 186 | .IR i -th
|
---|
| 187 | occurrence of a regular expression which will be prompted for.
|
---|
| 188 | If there are less than
|
---|
| 189 | .I i
|
---|
| 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.
|
---|
| 195 | .br
|
---|
| 196 | Note: Some systems do not have
|
---|
| 197 | .BR regex (3).
|
---|
| 198 | On those systems, searches are still supported, but regular expressions
|
---|
| 199 | are not.
|
---|
| 200 | .Ec
|
---|
| 201 | .Nc "skip lines backwards" bsl S
|
---|
| 202 | Skip
|
---|
| 203 | .I i
|
---|
| 204 | lines backwards and display a page.
|
---|
| 205 | .Ec
|
---|
| 206 | .Nc "skip pages backwards" bsp F
|
---|
| 207 | Skip
|
---|
| 208 | .I i
|
---|
| 209 | pages backwards and display a page.
|
---|
| 210 | .Ec
|
---|
| 211 | .Nc "scroll up and set scrollsize" bss b
|
---|
| 212 | Scroll up
|
---|
| 213 | .I i
|
---|
| 214 | lines (or
|
---|
| 215 | .I scroll-size
|
---|
| 216 | lines if
|
---|
| 217 | .I i
|
---|
| 218 | is not given.
|
---|
| 219 | If
|
---|
| 220 | .I i
|
---|
| 221 | is given, the
|
---|
| 222 | .I scroll-size
|
---|
| 223 | is set to
|
---|
| 224 | .IR i .
|
---|
| 225 | .Ec
|
---|
| 226 | .Nc "change key map" chm X
|
---|
| 227 | Change from the current key map to the other (if there is one).
|
---|
| 228 | .Ec
|
---|
| 229 | .Nc "exchange current page and mark" exg x
|
---|
| 230 | Set the mark to the current page, and display the previously marked
|
---|
| 231 | page.
|
---|
| 232 | .Ec
|
---|
| 233 | .Nc "visit next file" ff N
|
---|
| 234 | Visit the
|
---|
| 235 | .IR i -th
|
---|
| 236 | next file given in the command line.
|
---|
| 237 | .Ec
|
---|
| 238 | .Nc "scroll one line down or go to line" fl "^J ~or~ ^M ~or~ j"
|
---|
| 239 | If
|
---|
| 240 | .I i
|
---|
| 241 | is not given, scroll one line down. Otherwise,
|
---|
| 242 | .I i
|
---|
| 243 | will be interpreted as a line number. A page starting with the line
|
---|
| 244 | indicated will then be displayed.
|
---|
| 245 | .Ec
|
---|
| 246 | .Nc "display next page" fp <space>
|
---|
| 247 | Display the next page, consisting of
|
---|
| 248 | .I i
|
---|
| 249 | lines, (or
|
---|
| 250 | .I page-size
|
---|
| 251 | lines if no argument is given).
|
---|
| 252 | .Ec
|
---|
| 253 | .Nc "display next page and set pagesize" fps z
|
---|
| 254 | Display the next page, consisting of
|
---|
| 255 | .I i
|
---|
| 256 | lines, (or
|
---|
| 257 | .I page-size
|
---|
| 258 | lines if no argument is given).
|
---|
| 259 | If
|
---|
| 260 | .I i
|
---|
| 261 | is given, the
|
---|
| 262 | .I page-size
|
---|
| 263 | is set to
|
---|
| 264 | .IR i .
|
---|
| 265 | .Ec
|
---|
| 266 | .Nc "scroll down" fs ^D
|
---|
| 267 | Scroll down
|
---|
| 268 | .I i
|
---|
| 269 | lines (or
|
---|
| 270 | .I scroll-size
|
---|
| 271 | lines if no argument is given).
|
---|
| 272 | .Ec
|
---|
| 273 | .Nc "search forwards for pattern" fse /
|
---|
| 274 | Search forwards for the
|
---|
| 275 | .IR i -th
|
---|
| 276 | occurrence of a regular expression which will be prompted for.
|
---|
| 277 | If there are less than
|
---|
| 278 | .I i
|
---|
| 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.
|
---|
| 284 | .br
|
---|
| 285 | Note: Some systems do not have
|
---|
| 286 | .BR regex (3).
|
---|
| 287 | On those systems, searches are still supported, but regular expressions
|
---|
| 288 | are not.
|
---|
| 289 | .Ec
|
---|
| 290 | .Nc "skip lines forwards" fsl s
|
---|
| 291 | Skip
|
---|
| 292 | .I i
|
---|
| 293 | lines and display a page.
|
---|
| 294 | .Ec
|
---|
| 295 | .Nc "skip pages forwards" fsp f
|
---|
| 296 | Skip
|
---|
| 297 | .I i
|
---|
| 298 | pages and display a page.
|
---|
| 299 | .Ec
|
---|
| 300 | .Nc "scroll down and set scrollsize" fss d
|
---|
| 301 | Scroll down
|
---|
| 302 | .I i
|
---|
| 303 | lines (or
|
---|
| 304 | .I scroll-size
|
---|
| 305 | lines if
|
---|
| 306 | .I i
|
---|
| 307 | is not given.
|
---|
| 308 | If
|
---|
| 309 | .I i
|
---|
| 310 | is given, the
|
---|
| 311 | .I scroll-size
|
---|
| 312 | is set to
|
---|
| 313 | .IR i .
|
---|
| 314 | .Ec
|
---|
| 315 | .Nc "help" hlp h
|
---|
| 316 | Give a short description of all commands that are bound to a key sequence.
|
---|
| 317 | .Ec
|
---|
| 318 | .Nc "set a mark" mar m
|
---|
| 319 | Set a mark on the current page.
|
---|
| 320 | .Ec
|
---|
| 321 | .Nc "repeat last search" nse n
|
---|
| 322 | Search for the
|
---|
| 323 | .IR i -th
|
---|
| 324 | occurrence of the last regular expression entered, in the direction of the
|
---|
| 325 | last search.
|
---|
| 326 | .Ec
|
---|
| 327 | .Nc "repeat last search in other direction" nsr r
|
---|
| 328 | Search for the
|
---|
| 329 | .IR i -th
|
---|
| 330 | occurrence of the last regular expression entered, but in the other direction.
|
---|
| 331 | .Ec
|
---|
| 332 | .Nc "quit" qui "Q ~or~ q"
|
---|
| 333 | Exit from
|
---|
| 334 | .BR yap .
|
---|
| 335 | .Ec
|
---|
| 336 | .Nc "redraw" red ^L
|
---|
| 337 | Redraw the current page.
|
---|
| 338 | .Ec
|
---|
| 339 | .Nc "repeat" rep .
|
---|
| 340 | Repeat the last command. This does not always make sense, so not all
|
---|
| 341 | commands can be repeated.
|
---|
| 342 | .Ec
|
---|
| 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.
|
---|
| 350 | .Ec
|
---|
| 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
|
---|
| 354 | too.
|
---|
| 355 | .Ec
|
---|
| 356 | .Nc "go to mark" tom '
|
---|
| 357 | Display the marked page.
|
---|
| 358 | .Ec
|
---|
| 359 | .Nc "top" top ^^
|
---|
| 360 | Display a page starting with the first line of the input.
|
---|
| 361 | .Ec
|
---|
| 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.
|
---|
| 365 | .Ec
|
---|
| 366 | .Nc "write input to a file" wrf w
|
---|
| 367 | Write the input to a file, whose name will be prompted for.
|
---|
| 368 | .Ec
|
---|
| 369 | .PP
|
---|
| 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
|
---|
| 374 | being formed.
|
---|
| 375 | .SH AUTHOR
|
---|
| 376 | Ceriel J.H. Jacobs
|
---|
| 377 | .SH SEE ALSO
|
---|
| 378 | .BR regex (3).
|
---|
| 379 | .SH BUGS
|
---|
| 380 | .B Yap
|
---|
| 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
|
---|
| 384 | erase a line or
|
---|
| 385 | insert one.
|
---|
| 386 | .PP
|
---|
| 387 | In lines longer than about 2000 characters, a linefeed is silently inserted.
|
---|
| 388 | .PP
|
---|
| 389 | The percentage, given in the prompt when
|
---|
| 390 | .B yap
|
---|
| 391 | reads from a file (and knows it), is not always very accurate.
|
---|