277 lines
13 KiB
HTML
277 lines
13 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>yap(1)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>yap(1)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
yap, more - yet another pager
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>yap</STRONG> [ <STRONG>-cnuq</STRONG> ] [ <STRONG>-</STRONG><EM>n</EM> ] [ <STRONG>+</STRONG><EM>command</EM> ] [ name ... ]
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
<EM>Yap</EM> is a program allowing the user to examine a continuous text one
|
|
screenful at a time on a video display terminal. It does so by pausing
|
|
after each screenful, waiting for the user to type a command. The
|
|
commands are enumerated later. <EM>Yap</EM>'s main feature is, that it can page
|
|
both forwards and backwards, even when reading from standard input.
|
|
|
|
The command line options are:
|
|
|
|
-<EM>n</EM> An integer which is the size (in lines) of a page (the initial <EM>page</EM>-
|
|
<EM>size</EM>.
|
|
|
|
<STRONG>-c</STRONG> Normally, <EM>yap</EM> will display each page by beginning at the top of the
|
|
screen and erasing each line just before it displays on it. If your
|
|
terminal cannot erase a line, <EM>yap</EM> will clear the screen before it
|
|
displays a page.
|
|
This avoids scrolling the screen, making it easier to read while <EM>yap</EM>
|
|
is writing. The <STRONG>-c</STRONG> option causes <EM>yap</EM> to scroll the screen instead
|
|
of beginning at the top of the screen. This is also done if your
|
|
terminal cannot either erase a line or clear the screen.
|
|
|
|
<STRONG>-u</STRONG> Normally, <EM>yap</EM> handles underlining such as produced by nroff in a
|
|
manner appropriate to the particular terminal: if the terminal can
|
|
perform underlining well (t.i., the escape sequences for underlining
|
|
do not occupy space on the screen), <EM>yap</EM> will underline underlined
|
|
information in the input. The <STRONG>-u</STRONG> option supresses this underlining.
|
|
|
|
<STRONG>-n</STRONG> Normally, <EM>yap</EM> also recognises escape sequences for stand-out mode or
|
|
underlining mode in the input, and knows how much space these escape
|
|
sequences will occupy on the screen, so that <EM>yap</EM> will not fold lines
|
|
erroneously. The <STRONG>-n</STRONG> option supresses this pattern matching.
|
|
|
|
<STRONG>-q</STRONG> This option will cause <EM>yap</EM> to exit only on the "quit" command.
|
|
|
|
<STRONG>+</STRONG><EM>command</EM>
|
|
<EM>command</EM> is taken to be an initial command to <EM>yap</EM>.
|
|
|
|
<EM>Yap</EM> uses the <STRONG><A HREF="../man5/termcap.5.html">termcap(5)</A></STRONG> database to determine the terminal capabilities
|
|
and the default <EM>page</EM>-<EM>size</EM>. It examines the $TERM environment variable to
|
|
identify the terminal type. If $TERM is not set, it defaults to <EM>dumb</EM>.
|
|
<EM>Yap</EM> Also examines the $TERMCAP environment variable to locate the
|
|
<STRONG><A HREF="../man5/termcap.5.html">termcap(5)</A></STRONG> database. If $TERMCAP is not set, it defaults to
|
|
/<EM>etc</EM>/<EM>termcap</EM>.
|
|
|
|
<EM>Yap</EM> looks in the $YAP environment variable to pre-set flags. For
|
|
instance, if you prefer the <STRONG>-c</STRONG> mode of operation, just set the $YAP
|
|
environment variable to <STRONG>-c</STRONG>.
|
|
|
|
The commands of <EM>yap</EM> can be bound to sequences of keystrokes. The
|
|
environment variable $YAPKEYS may contain the bindings in the form of a
|
|
list of colon-separated `name=sequence' pairs. The <EM>name</EM> is a short
|
|
mnemonic for the command, the <EM>sequence</EM> is the sequence of keystrokes to
|
|
be typed to invoke the command. This sequence may contain a ^X escape,
|
|
which means control-X, and a \X escape, which means X. The latter can be
|
|
used to get the characters `^', `\' and `:' in the sequence. There are
|
|
two keymaps available, the default one and a user-defined one. You can
|
|
switch between one and the other with the <EM>change</EM> <EM>keymap</EM> command.
|
|
|
|
The <EM>yap</EM> commands are described below. The mnemonics for the commands are
|
|
given in parentheses. The default key sequences (if any) are given after
|
|
the mnemonic. Every command takes an optional integer argument, which
|
|
may be typed before the command. Some commands just ignore it. The
|
|
integer argument is referred to as <EM>i</EM>. Usually, if <EM>i</EM> is not given, it
|
|
defaults to 1.
|
|
|
|
visit previous file (<EM>bf</EM>) <STRONG>P</STRONG>
|
|
Visit the <EM>i</EM>-th previous file given in the command line.
|
|
|
|
scroll one line up or go to line (<EM>bl</EM>) <STRONG>^K</STRONG> or <STRONG>k</STRONG>
|
|
If <EM>i</EM> is not given, scroll one line up. Otherwise, <EM>i</EM> will be
|
|
interpreted as a line number. A page starting with the line
|
|
indicated will then be displayed.
|
|
|
|
bottom (<EM>bot</EM>) <STRONG>l</STRONG> or <STRONG>$</STRONG>
|
|
Go to the last line of the input.
|
|
|
|
display previous page (<EM>bp</EM>) <STRONG>-</STRONG>
|
|
Display the previous page, consisting of <EM>i</EM> lines, (or <EM>page</EM>-<EM>size</EM>
|
|
lines if no argument is given).
|
|
|
|
display previous page and set pagesize (<EM>bps</EM>) <STRONG>Z</STRONG>
|
|
Display the previous page, consisting of <EM>i</EM> lines, (or <EM>page</EM>-<EM>size</EM>
|
|
lines if no argument is given). If <EM>i</EM> is given, the <EM>page</EM>-<EM>size</EM> is set
|
|
to <EM>i</EM>.
|
|
|
|
scroll up (<EM>bs</EM>) <STRONG>^B</STRONG>
|
|
Scroll up <EM>i</EM> lines (or <EM>scroll</EM>-<EM>size</EM> lines if <EM>i</EM> is not given.
|
|
Initially, the <EM>scroll</EM>-<EM>size</EM> is 11).
|
|
|
|
search backwards for pattern (<EM>bse</EM>) <STRONG>?</STRONG>
|
|
Search backwards for the <EM>i</EM>-th occurrence of a regular expression
|
|
which will be prompted for. If there are less than <EM>i</EM> occurrences of
|
|
the expression, the position in the file remains unchanged.
|
|
Otherwise, a page is displayed, starting two lines before the place
|
|
where the expression was found. The user's erase and kill characters
|
|
may be used to edit the expression. Erasing back past the first
|
|
character cancels the search command.
|
|
Note: Some systems do not have <STRONG><A HREF="../man3/regex.3.html">regex(3)</A></STRONG>. On those systems, searches
|
|
are still supported, but regular expressions are not.
|
|
|
|
skip lines backwards (<EM>bsl</EM>) <STRONG>S</STRONG>
|
|
Skip <EM>i</EM> lines backwards and display a page.
|
|
|
|
skip pages backwards (<EM>bsp</EM>) <STRONG>F</STRONG>
|
|
Skip <EM>i</EM> pages backwards and display a page.
|
|
|
|
scroll up and set scrollsize (<EM>bss</EM>) <STRONG>b</STRONG>
|
|
Scroll up <EM>i</EM> lines (or <EM>scroll</EM>-<EM>size</EM> lines if <EM>i</EM> is not given. If <EM>i</EM> is
|
|
given, the <EM>scroll</EM>-<EM>size</EM> is set to <EM>i</EM>.
|
|
|
|
change key map (<EM>chm</EM>) <STRONG>^[</STRONG>
|
|
Change from the current key map to the other (if there is one).
|
|
|
|
exchange current page and mark (<EM>exg</EM>) <STRONG>x</STRONG>
|
|
Set the mark to the current page, and display the previously marked
|
|
page.
|
|
|
|
visit next file (<EM>ff</EM>) <STRONG>N</STRONG>
|
|
Visit the <EM>i</EM>-th next file given in the command line.
|
|
|
|
scroll one line down or go to line (<EM>fl</EM>) <STRONG>^J</STRONG> or <STRONG>^M</STRONG> or <STRONG>j</STRONG>
|
|
If <EM>i</EM> is not given, scroll one line down. Otherwise, <EM>i</EM> will be
|
|
interpreted as a line number. A page starting with the line
|
|
indicated will then be displayed.
|
|
|
|
display next page (<EM>fp</EM>) <STRONG><space></STRONG>
|
|
Display the next page, consisting of <EM>i</EM> lines, (or <EM>page</EM>-<EM>size</EM> lines if
|
|
no argument is given).
|
|
|
|
display next page and set pagesize (<EM>fps</EM>) <STRONG>z</STRONG>
|
|
Display the next page, consisting of <EM>i</EM> lines, (or <EM>page</EM>-<EM>size</EM> lines if
|
|
no argument is given). If <EM>i</EM> is given, the <EM>page</EM>-<EM>size</EM> is set to <EM>i</EM>.
|
|
|
|
scroll down (<EM>fs</EM>) <STRONG>^D</STRONG>
|
|
Scroll down <EM>i</EM> lines (or <EM>scroll</EM>-<EM>size</EM> lines if no argument is given).
|
|
|
|
search forwards for pattern (<EM>fse</EM>) <STRONG>/</STRONG>
|
|
Search forwards for the <EM>i</EM>-th occurrence of a regular expression
|
|
which will be prompted for. If there are less than <EM>i</EM> occurrences of
|
|
the expression, the position in the file remains unchanged.
|
|
Otherwise, a page is displayed, starting two lines before the place
|
|
where the expression was found. The user's erase and kill characters
|
|
may be used to edit the expression. Erasing back past the first
|
|
character cancels the search command.
|
|
Note: Some systems do not have <STRONG><A HREF="../man3/regex.3.html">regex(3)</A></STRONG>. On those systems, searches
|
|
are still supported, but regular expressions are not.
|
|
|
|
skip lines forwards (<EM>fsl</EM>) <STRONG>s</STRONG>
|
|
Skip <EM>i</EM> lines and display a page.
|
|
|
|
skip pages forwards (<EM>fsp</EM>) <STRONG>f</STRONG>
|
|
Skip <EM>i</EM> pages and display a page.
|
|
|
|
scroll down and set scrollsize (<EM>fss</EM>) <STRONG>d</STRONG>
|
|
Scroll down <EM>i</EM> lines (or <EM>scroll</EM>-<EM>size</EM> lines if <EM>i</EM> is not given. If <EM>i</EM>
|
|
is given, the <EM>scroll</EM>-<EM>size</EM> is set to <EM>i</EM>.
|
|
|
|
help (<EM>hlp</EM>) <STRONG>h</STRONG>
|
|
Give a short description of all commands that are bound to a key
|
|
sequence.
|
|
|
|
set a mark (<EM>mar</EM>) <STRONG>m</STRONG>
|
|
Set a mark on the current page.
|
|
|
|
repeat last search (<EM>nse</EM>) <STRONG>n</STRONG>
|
|
Search for the <EM>i</EM>-th occurrence of the last regular expression
|
|
entered, in the direction of the last search.
|
|
|
|
repeat last search in other direction (<EM>nsr</EM>) <STRONG>r</STRONG>
|
|
Search for the <EM>i</EM>-th occurrence of the last regular expression
|
|
entered, but in the other direction.
|
|
|
|
quit (<EM>qui</EM>) <STRONG>Q</STRONG> or <STRONG>q</STRONG>
|
|
Exit from <EM>yap</EM>.
|
|
|
|
redraw (<EM>red</EM>) <STRONG>^L</STRONG>
|
|
Redraw the current page.
|
|
|
|
repeat (<EM>rep</EM>) <STRONG>.</STRONG>
|
|
Repeat the last command. This does not always make sense, so not all
|
|
commands can be repeated.
|
|
|
|
shell escape (<EM>shl</EM>) <STRONG>!</STRONG>
|
|
Invoke the shell with a command that will be prompted for. In the
|
|
command, the characters `%' and `!' are replaced with the current
|
|
file name and the previous shell command respectively. The
|
|
sequences `\%' and `\!' are replaced by `%' and `!' respectively.
|
|
The user's erase and kill characters can be used to edit the
|
|
command. Erasing back past the first character cancels the command.
|
|
|
|
pipe to shell command (<EM>pip</EM>) <STRONG>|</STRONG>
|
|
Pipe the current input file into a shell command that will be
|
|
prompted for. The comments given in the description of the shell
|
|
escape command apply here too.
|
|
|
|
go to mark (<EM>tom</EM>) <STRONG>'</STRONG>
|
|
Display the marked page.
|
|
|
|
top (<EM>top</EM>) <STRONG>^^</STRONG>
|
|
Display a page starting with the first line of the input.
|
|
|
|
visit file (<EM>vis</EM>) <STRONG>e</STRONG>
|
|
Visit a new file. The filename will be prompted for. If you just
|
|
type a return, the current file is revisited.
|
|
|
|
write input to a file (<EM>wrf</EM>) <STRONG>w</STRONG>
|
|
Write the input to a file, whose name will be prompted for.
|
|
|
|
The commands take effect immediately, i.e., it is not necessary to type a
|
|
carriage return. Up to the time when the command sequence itself is
|
|
given, the user may give an interrupt to cancel the command being formed.
|
|
|
|
|
|
</PRE>
|
|
<H2>AUTHOR</H2><PRE>
|
|
Ceriel J.H. Jacobs
|
|
|
|
|
|
</PRE>
|
|
<H2>FILES</H2><PRE>
|
|
/etc/termcap Terminal capabilities data base
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG><A HREF="../man5/termcap.5.html">termcap(5)</A></STRONG>, <STRONG><A HREF="../man3/regex.3.html">regex(3)</A></STRONG>.
|
|
|
|
|
|
</PRE>
|
|
<H2>BUGS</H2><PRE>
|
|
<EM>Yap</EM> will find your terminal very stupid and act like it, if it has no way
|
|
of placing the cursor on the home position, or cannot either erase a line
|
|
or insert one.
|
|
|
|
In lines longer than about 2000 characters, a linefeed is silently
|
|
inserted.
|
|
|
|
The percentage, given in the prompt when <EM>yap</EM> reads from a file (and knows
|
|
it), is not always very accurate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|