App-column-run
view release on metacpan or search on metacpan
NAME
App::column::run - Run several commands and show their output in
multiple columns
VERSION
This document describes version 0.005 of App::column::run (from Perl
distribution App-column-run), released on 2021-07-08.
DESCRIPTION
Sample screenshots:
FUNCTIONS
column_run
Usage:
column_run(%args) -> [$status_code, $reason, $payload, \%result_meta]
Run several commands and show their output in multiple columns.
This utility is similar to using the Unix utility pr to columnate
output, something like (in bash):
% pr -T -m -w $COLUMNS <(command1 args...) <(command2 args...)
except with the following differences:
* commands are run in sequence, not in parallel (although parallel
execution is a TODO list item);
* all output are collected first, then displayed (although streaming
output is a TODO list item);
* multiplexing STDIN to all commands;
* ANSI color and wide character handling;
* passing adjusted COLUMNS environment to commands so they can adjust
output;
* passing common arguments and environment variables to all commands
(as well as allowing each command to have its unique arguments or
environment variables).
This function is not exported.
Arguments ('*' denotes required arguments):
* args_arrays => *array[aos]*
Arguments to give to each command (an array of arrays of strings).
If "--common-args" is also set, then the common arguments will be
added first, then the per-command arguments.
* commands* => *array[str]*
* common_args => *array[str]*
Common arguments to pass to each command.
If "--args-arrays" is also set, then the common arguments will be
added first, then the per-command arguments.
* common_envs => *hash*
Common environment variables to pass to each command.
* envs_arrays => *array[hos]*
Environment variables to give to each command (an array of hashes of
strings).
* linum_width => *posint*
Line number width.
* on_long_line => *str* (default: "clip")
What to do to long lines.
* separator => *str* (default: "|")
Separator character between columns.
* show_linum => *bool*
Show line number.
Returns an enveloped result (an array).
( run in 1.093 second using v1.01-cache-2.11-cpan-39bf76dae61 )