App-ansicolumn

 view release on metacpan or  search on metacpan

script/ansicolumn  view on Meta::CPAN

=item B<--tabhead>=#

=item B<--tabspace>=#

Set the head and following space characters.  Both are space by default.
If the option value is longer than a single character, it is evaluated
as a Unicode name.

=item B<--tabstyle>, B<--ts>

=item B<--tabstyle>=I<style>, B<--ts>=...

=item B<--tabstyle>=I<head-style>,I<space-style> B<--ts>=...

Set how tabs are expanded.  Select C<symbol> or C<shade> for
example.  If two style names are combined, like
C<squat-arrow,middle-dot>, use C<squat-arrow> for tabhead and
C<middle-dot> for tabspace.

Shows the available style list if called without a parameter.  Styles
are defined in the L<Text::ANSI::Fold> library.

=item B<--ambiguous>=C<wide>|C<narrow> (DEFAULT: C<narrow>)

Specifies how to treat Unicode ambiguous width characters.  Takes a
value of C<narrow> or C<wide>.  Default is C<narrow>.

=item B<--pages>

Split file content by formfeed characters, and treat each part as an
individual file.  Use with the C<--parallel> option.

=begin comment

=item B<-->[B<no->]B<discard-el>

Discard ANSI Erase Line sequence.  Default true.

=item B<--padchar>=I<char>

Set padding character.

=end comment

=back

=head1 DEFAULT ALIASES

The following options are defined in F<App::ansicolumn::default.pm>.

=over 7

=item B<--board-color> I<fg-color> I<bg-color>

This option is defined as follows:

   option --board-color \
          --bs=inner-box \
          --cm=BORDER=$<2>,TEXT=$<shift>/$<shift>

The resulting text is displayed in an I<fg-color> font on an
I<bg-color> panel.

=item B<--white-board>

=item B<--black-board>

=item B<--green-board>

=item B<--slate-board>

Use the C<--board-color> option to display text on white, black,
green, or dark slate panels.

=back

=head1 CALCULATION

For the C<--height>, C<--width>, C<--pane>, C<--up> and C<--pane-width>
options, besides giving numeric digits, you can calculate the number
using the terminal size.  If the expression contains a non-digit
character, it is evaluated as an RPN (Reverse Polish Notation)
expression with the terminal size pushed on the stack.  The initial
value for C<--height> is the terminal height, and the terminal width
for others.

    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 C<1-2/>
and C<< S<1 - 2 /> >> and C<1,-,2,/> are all the same.  See C<perldoc
Math::RPN> for details.

The next example selects the number of panes by dividing the terminal
width by 85:

    ansicolumn --pane 85/

If you need to handle the case where the terminal width is less than 85:

    ansicolumn --pane 85/,DUP,1,GE,EXCH,1,IF

This RPN means C<< $width/85 >= 1 ? $width/85 : 1 >>.

=head1 STARTUP

This command is implemented with the L<Getopt::EX> module, so the

    ~/.ansicolumnrc

file is read at startup.  If you always want to use
C<--no-white-space>, put this line in your F<~/.ansicolumnrc>:

    option default --no-white-space

The command can also be extended with custom modules using the C<-M>
option.  See C<perldoc Getopt::EX> for details.



( run in 1.341 second using v1.01-cache-2.11-cpan-5735350b133 )