App-ansiecho
view release on metacpan or search on metacpan
script/ansiecho view on Meta::CPAN
=item B<-n>
Do not print newline at the end.
=item B<-e>, B<-->[B<no->]B<escape>
Enable interpretation of backslash escapes in the normal string
argument. This option is enabled by default, unlike bash built-in
L<echo(1)> command. Use B<--no-escape> to disable it.
=item B<-j>, B<--join>
Do not print space between arguments. This is a short-cut for
C<--separate ''>.
=item B<--separate> I<string>
Set separator string between arguments.
=item B<-->[B<no->]B<rgb24>
Produce 24bit full-color sequence for 12bit/24bit specified colors.
They are converted to 216 colors by default.
=item B<-h>, B<--help>
Print help.
=item B<-v>, B<--version>
Print version.
=back
=head1 PREFIX OPTIONS
=over 7
=item B<-s> I<spec>
Print raw ANSI sequence for given I<spec>.
=item B<-c> I<spec> I<string>
Print I<string> in a color given by I<spec>.
=item B<-f> I<format> I<args> ...
Print I<args> in a given I<format>. Backslash escape is always
interpreted in the format string.
The result of B<-f> sequence ends up to a single argument, and can be
a subject of other B<-c> or B<-f> option.
Number of arguments are calculated from the number of C<%> characters
in the format string except C<%%>. Variable width and precision
parameter C<*> can be used like C<%*s> or C<%*.*s>.
Format string also can be made by B<-f> option. Next commands produce
same output, but second one looks better.
ansiecho -f -f '%%%ds' 16 hello
ansiecho -f '%*s' 16 hello
=item B<-S> I<spec>
If option C<-S> found, all following arguments are considered as a
color spec given to B<-s> option, until option B<-E> is found.
Next two commands are equivalent.
ansiecho -s ZE -s K/544 -s K/454 -s K/445
ansiecho -S ZE K/544 K/454 K/445
=item B<-C> I<spec>
Option B<-C> set permanent color which is applied to all following
arguments until option B<-E> found.
Next command prints only a word C<Yellow> in yellow, but second one
print C<Yellow>, C<Brick>, and C<Road> in yellow.
ansiecho Follow the -cYS Yellow Brick Road
ansiecho Follow the -CYS Yellow Brick Road
You may want to color the phrase instead.
ansiecho Follow the -cYS "Yellow Brick Road"
Option C<-C> can be used multiple times mixed with C<-F> option. See
below.
=item B<-F> I<format>
As with the C<-C> option, C<-F> defines a format which is applied to
all arguments until option B<-E> found. Format string have to include
single C<%s> placeholder.
ansiecho Follow the -CYS -F ' %s ' Yellow Brick Road
Option B<-C> and B<-F> can be used repeatedly, and they will take
effect in the reverse order of their appearance.
Next command show argument C<A> in underline/bold with blinking red
arrow.
ansiecho -cRF -f'->%s' -cUD A B C
Next one does the same thing for all arguments.
ansiecho -CRF -F'->%s' -CUD A B C
â â â
=item B<-E>
Terminate B<-C>, B<-F> and B<-S> effects.
( run in 1.899 second using v1.01-cache-2.11-cpan-99c4e6809bf )