summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/Colors.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Reply/Plugin/Colors.pm')
-rw-r--r--lib/Reply/Plugin/Colors.pm20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Reply/Plugin/Colors.pm b/lib/Reply/Plugin/Colors.pm
index 8b68119..839654d 100644
--- a/lib/Reply/Plugin/Colors.pm
+++ b/lib/Reply/Plugin/Colors.pm
@@ -1,11 +1,31 @@
package Reply::Plugin::Colors;
use strict;
use warnings;
+# ABSTRACT: colorize output
use base 'Reply::Plugin';
use Term::ANSIColor;
+=head1 SYNOPSIS
+
+ ; .replyrc
+ [Colors]
+ error = bright red
+ warning = bright yellow
+ result = bright green
+
+=head1 DESCRIPTION
+
+This plugin adds coloring to the results when they are printed to the screen.
+By default, errors are C<red>, warnings are C<yellow>, and normal results are
+C<green>, although this can be overridden through configuration as shown in the
+synopsis. L<Term::ANSIColor> is used to generate the colors, so any value that
+is accepted by that module is a valid value for the C<error>, C<warning>, and
+C<result> options.
+
+=cut
+
sub new {
my $class = shift;
my %opts = @_;