zmore: rewrite to fix bugs and assume POSIX
[debian/gzip] / zmore.1
1 .TH ZMORE 1
2 .SH NAME
3 zmore \- file perusal filter for crt viewing of compressed text
4 .SH SYNOPSIS
5 .B zmore
6 [ name ...  ]
7 .SH DESCRIPTION
8 .I  Zmore
9 is a filter which allows examination of compressed or plain text files
10 one screenful at a time on a soft-copy terminal.
11 .I zmore
12 works on files compressed with
13 .I compress, pack
14 or
15 .I gzip,
16 and also on uncompressed files.
17 If a file does not exist,
18 .I zmore
19 looks for a file of the same name with the addition of a .gz, .z or .Z suffix.
20 .PP
21 .I Zmore
22 normally pauses after each screenful, printing --More--
23 at the bottom of the screen.
24 If the user then types a carriage return, one more line is displayed.
25 If the user hits a space,
26 another screenful is displayed.  Other possibilities are enumerated later.
27 .PP
28 .I Zmore
29 looks in the file
30 .I /etc/termcap
31 to determine terminal characteristics,
32 and to determine the default window size.
33 On a terminal capable of displaying 24 lines,
34 the default window size is 22 lines.
35 To use a pager other than the default
36 .I more,
37 set environment variable PAGER to the name of the desired program, such as
38 .I less.
39 .PP
40 Other sequences which may be typed when
41 .I zmore
42 pauses, and their effects, are as follows (\fIi\fP is an optional integer
43 argument, defaulting to 1) :
44 .PP
45 .IP \fIi\^\fP<space>
46 display
47 .I i
48 more lines, (or another screenful if no argument is given)
49 .PP
50 .IP ^D
51 display 11 more lines (a ``scroll'').
52 If
53 .I i
54 is given, then the scroll size is set to \fIi\fP.
55 .PP
56 .IP d
57 same as ^D (control-D)
58 .PP
59 .IP \fIi\^\fPz
60 same as typing a space except that \fIi\fP, if present, becomes the new
61 window size.
62 .PP
63 .IP \fIi\^\fPs
64 skip \fIi\fP lines and print a screenful of lines
65 .PP
66 .IP \fIi\^\fPf
67 skip \fIi\fP screenfuls and print a screenful of lines
68 .PP
69 .IP "q or Q"
70 Quit.
71 .PP
72 .IP =
73 Display the current line number.
74 .PP
75 .IP \fIi\fP/expr
76 search for the \fIi\^\fP-th occurrence of the regular expression \fIexpr.\fP
77 The user's erase and kill characters may be used to edit the regular
78 expression.
79 Erasing back past the first column cancels the search command.
80 .PP
81 .IP \fIi\^\fPn
82 search for the \fIi\^\fP-th occurrence of the last regular expression entered.
83 .PP
84 .IP !command
85 invoke a shell with \fIcommand\fP.
86 The character `!' in "command" is replaced with the
87 previous shell command.  The sequence "\\!" is replaced by "!".
88 .PP
89 .IP ":q or :Q"
90 Quit
91 (same as q or Q).
92 .PP
93 .IP .
94 (dot) repeat the previous command.
95 .PP
96 The commands take effect immediately, i.e., it is not necessary to
97 type a carriage return.
98 Up to the time when the command character itself is given,
99 the user may hit the line kill character to cancel the numerical
100 argument being formed.
101 In addition, the user may hit the erase character to redisplay the
102 --More-- message.
103 .PP
104 At any time when output is being sent to the terminal, the user can
105 hit the quit key (normally control\-\\).
106 .I Zmore
107 will stop sending output, and will display the usual --More--
108 prompt.
109 The user may then enter one of the above commands in the normal manner.
110 Unfortunately, some output is lost when this is done, due to the
111 fact that any characters waiting in the terminal's output queue
112 are flushed when the quit signal occurs.
113 .PP
114 The terminal is set to
115 .I noecho
116 mode by this program so that the output can be continuous.
117 What you type will thus not show on your terminal, except for the / and !
118 commands.
119 .PP
120 If the standard output is not a teletype, then
121 .I zmore
122 acts just like
123 .I zcat,
124 except that a header is printed before each file
125 if there is more than one file.
126 .SH FILES
127 .TP
128 /etc/termcap
129 Terminal data base
130 .SH "SEE ALSO"
131 more(1), gzip(1), zdiff(1), zgrep(1), znew(1), zforce(1), gzexe(1)