Actions Status MetaCPAN Release

NAME

ansicolumn - ANSI terminal sequence aware column command

VERSION

Version 1.09

SYNOPSIS

ansicolumn [options] [file ...]

-c#                  output width
-s#                  separator string
-t                   table style output
-l#                  maximum number of table columns
-x                   exchange rows and columns
-o#                  output separator
-R#                  right adjust table columns

-P[#]                page mode, with optional page length
-D                   document mode
-C#                  number of panes
-S#                  pane width
-F                   full-width

--height=#           page height
--column-unit=#      column unit (default 8)
--linestyle=#        folding style (none|truncate|wrap|wordwrap)
--boundary=#         line-end boundary
--linebreak=#        line-break mode (none|all|runin|runout)
--runin=#            run-in width
--runout=#           run-out width
--[no-]pagebreak     allow page break
--border=#           print border
--border-style=#     border style
--[no-]ignore-space  ignore space in table output
--[no-]insert-space  insert empty line
--[no-]paragraph     same as --insert-space
--[no-]white-space   allow page top white spaces
--[no-]isolation     page-end line isolation
--fillup=#           fill-up unit (pane|page|none)
--tabstop=#          tab-stop character
--tabhead=#          tab-head character
--tabspace=#         tab-space width
--tabstyle=#         tab style
--ambiguous=#        ambiguous character width (narrow|wide)

DESCRIPTION

ansicolumn is a column(1) command clone which can handle ANSI terminal sequences. It supports traditional options and some of Linux extended, and other original options. Empty lines are not ignored, though.

COMPATIBLE OPTIONS

The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or, by default, from the standard input.

EXTENDED OPTION

CALCULATION

As for --height, --width and --pane-width options, besides giving numeric digits, you can calculate the number using terminal size. If the expression contains non-digit character, it is evaluated as a Reverse Polish Notation with the terminal size pushed on the stack.

OPTION              VALUE
=================   =========================
--height 1-         height - 1
--height 2/         height / 2
--height 1-2/       (height - 1) / 2
--height dup2%-2/   (height - height % 2) / 2

Space and comma characters are ignored in the expression. So 1-2/ and 1 - 2 / and 1,-,2,/ are all same. See `perldoc Math::RPN` for the expression detail.

STARTUP

This command is implemented with Getopt::EX module. So

~/.ansicolumnrc

file is read at start up. If you want use --no-white-space always, put this line in your ~/.ansicolumnrc.

option default --no-white-space

Also command can be extended by original modules with -M option. See `perldoc Getopt::EX` for detail.

INSTALL

CPANMINUS

$ cpanm App::ansicolumn
or
$ curl -sL http://cpanmin.us | perl - App::ansicolumn

To get the latest code, use this:

$ cpanm https://github.com/kaz-utashiro/App-ansicolumn.git

EXAMPLES

https://github.com/kaz-utashiro/App-ansicolumn/tree/master/images

SEE ALSO

column(1), https://man7.org/linux/man-pages/man1/column.1.html

App::ansicolumn, https://github.com/kaz-utashiro/App-ansicolumn

Text::ANSI::Printf, https://github.com/kaz-utashiro/Text-ANSI-Printf

AUTHOR

Kazumasa Utashiro

LICENSE

Copyright 2020-2021 Kazumasa Utashiro.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.