| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::optex::up; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = "1.07"; |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=encoding utf-8 |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
up - optex module for multi-column paged output |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
optex -Mup command ... |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
optex -Mup -C2 -- command ... |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
optex -Mup -G2x2 -- command ... |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
B is a module for the B command that pipes the output |
|
22
|
|
|
|
|
|
|
through L for multi-column formatting and a pager. |
|
23
|
|
|
|
|
|
|
The name comes from the printing term "n-up" (2-up, 3-up, etc.) which |
|
24
|
|
|
|
|
|
|
refers to printing multiple pages on a single sheet. |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
The module automatically calculates the number of columns based on the |
|
27
|
|
|
|
|
|
|
terminal width divided by the pane width (default 85 characters). |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Both stdout and stderr are merged and passed through the filter, so |
|
30
|
|
|
|
|
|
|
error messages are also displayed in the multi-column paged output. |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
The pager command is taken from the C environment variable |
|
33
|
|
|
|
|
|
|
if set, otherwise defaults to C. The environment |
|
34
|
|
|
|
|
|
|
variable is named after the L command, a wrapper for this |
|
35
|
|
|
|
|
|
|
module. The C variable is not used to avoid an infinite loop |
|
36
|
|
|
|
|
|
|
when C is set to C. Use the C<--pager> option to specify |
|
37
|
|
|
|
|
|
|
a different pager on the command line. |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
The C<-F> option causes C to exit immediately if the output |
|
40
|
|
|
|
|
|
|
fits on one screen. C<+Gg> causes C to read all input before |
|
41
|
|
|
|
|
|
|
displaying, which may take time for large output, but prevents empty |
|
42
|
|
|
|
|
|
|
trailing pages from being shown. |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 OPTIONS |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Module options must be specified before C<--> separator. |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=over 4 |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item B<-C> I, B<--pane>=I |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Set the number of columns (panes) directly. |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item B<-R> I, B<--row>=I |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Set the number of rows. The page height is calculated by dividing |
|
57
|
|
|
|
|
|
|
the terminal height by this value. |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=item B<-G> I, B<--grid>=I |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Set the grid layout. For example, C<--grid=2x3> or C<--grid=2,3> |
|
62
|
|
|
|
|
|
|
creates a 2-column, 3-row layout (6-up). This is equivalent to |
|
63
|
|
|
|
|
|
|
C<-C2 -R3>. |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item B<-S> I, B<--pane-width>=I |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Set the pane width in characters. Default is 85. When B<--pane> is |
|
68
|
|
|
|
|
|
|
not specified, the number of panes is calculated by dividing the |
|
69
|
|
|
|
|
|
|
terminal width by this value. |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item B<--bs>=I |