Synopsis
use Text::ANSI::Printf;
Text::ANSI::Printf::printf FORMAT, LIST
Text::ANSI::Printf::sprintf FORMAT, LIST
use Text::ANSI::Printf qw(ansi_printf ansi_sprintf);
ansi_printf FORMAT, LIST
ansi_sprintf FORMAT, LIST
Description
Text::ANSI::Printf is a almost-printf-compatible library with a capability of handling string with ANSI terminal sequences, as well as multi-byte wide characters.
This is just a quick hack using existing modules, Text::VisualPrintf and Text::ANSI::Fold::Util. Not tuned for performance. Most of complicated work is done in Text::ANSI::Fold module.
INSTALL: cpanm https://github.com/kaz-utashiro/Text-ANSI-Printf.git
Comments
> perl -pe 's/ansi_// if /^is/' t/02_export.t | perl -Ilib -
Try something like this:
$ ls -1 | column
$ ls -1 --color=always | column
$ ls -1 --color=always | ansicolumn
I think it explains the function well.
It is better to get similar output for succeeded code, but I don't know the way.
Also, you don't have to run 'ansicolumn' to know how it works because it works just as you expect.
https://metacpan.org/release/UTASHIRO/Text-ANSI-Printf-1.01
Please sign up to post a review.