App-nup

 view release on metacpan or  search on metacpan

lib/App/optex/up.pm  view on Meta::CPAN


Set the grid layout.  For example, C<--grid=2x3> or C<--grid=2,3>
creates a 2-column, 3-row layout (6-up).  This is equivalent to
C<-C2 -R3>.

=item B<-S> I<N>, B<--pane-width>=I<N>

Set the pane width in characters.  Default is 85.  When B<--pane> is
not specified, the number of panes is calculated by dividing the
terminal width by this value.

=item B<--bs>=I<STYLE>, B<--border-style>=I<STYLE>

Set the border style for ansicolumn.  Default is C<heavy-box>.
See L<App::ansicolumn> for available styles.

=item B<--no-paginate>

Disable page mode.  Without pagination, the entire content is
split evenly across columns.  Page mode is the default.

Note that L<App::ansicolumn> uses parallel layout when multiple
files are given, which has no page structure.  Specify this option
in such cases so that C<NUP_PAGE_PAGER> is not used (the L<nup>
command does this automatically).

=item B<-A>, B<--auto-paginate>

Automatically disable page mode when only one column fits the
terminal.

=item B<--pager>=I<COMMAND>

Set the pager command, overriding the environment variables.
Default is C<NUP_PAGE_PAGER> (page mode only), C<NUP_PAGER>, or
C<less -F +Gg>.

=item B<--no-pager>

Disable pager.  Output goes directly to stdout.

=item Other options

Any unrecognized options are passed through to L<App::ansicolumn>.
For example, C<--cm> option can be used to set colormap:

    optex -Mup --cm=BORDER=R -- command

See L<App::ansicolumn> for available options.

=back

=head1 EXAMPLES

Display perldoc output in multiple columns:

    optex -Mup perldoc App::optex::up

=begin html

<p><img width="750" src="https://raw.githubusercontent.com/tecolicom/App-nup/main/images/nup.png">

=end html

List files in multiple columns with pager:

    optex -Mup ls -l

Use 2 columns:

    optex -Mup -C2 -- ls -l

Set pane width to 100:

    optex -Mup -S100 -- ls -l

Use 2 rows (upper and lower):

    optex -Mup -R2 -- ls -l

Use 2x2 grid (4-up):

    optex -Mup -G2x2 -- ls -l

No pagination:

    optex -Mup --no-paginate -- man perl

Use a different border style:

    optex -Mup --bs=round-box -- ls -l

Output without pager (useful for piping):

    optex -Mup --no-pager -C2 -- ls -l | head

Truncate long lines:

    optex -Mup --ls=truncate -- ps aux

=head1 INSTALL

=head2 CPANMINUS

    cpanm App::nup

=head1 SEE ALSO

L<App::nup>, L<https://github.com/tecolicom/App-nup>

L<App::optex>, L<https://github.com/kaz-utashiro/optex>

L<App::ansicolumn>

=head1 AUTHOR

Kazumasa Utashiro

=head1 LICENSE

Copyright 2025 Kazumasa Utashiro.



( run in 0.555 second using v1.01-cache-2.11-cpan-788537b7465 )