summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/ReadLine.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-03 15:18:17 -0500
committerJesse Luehrs <doy@tozt.net>2013-06-03 15:51:17 -0500
commitec069554b263d4d3a60a315089e170b92badd1d8 (patch)
tree38e4b6cb2196ee0b56aa33c29df3a94c53ad1e20 /lib/Reply/Plugin/ReadLine.pm
parent60f235d03fba8232e7f691550ee715e1cfb9c5b6 (diff)
downloadreply-ec069554b263d4d3a60a315089e170b92badd1d8.tar.gz
reply-ec069554b263d4d3a60a315089e170b92badd1d8.zip
start on some docs
Diffstat (limited to 'lib/Reply/Plugin/ReadLine.pm')
-rw-r--r--lib/Reply/Plugin/ReadLine.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Reply/Plugin/ReadLine.pm b/lib/Reply/Plugin/ReadLine.pm
index 39126d1..6fcb0ad 100644
--- a/lib/Reply/Plugin/ReadLine.pm
+++ b/lib/Reply/Plugin/ReadLine.pm
@@ -1,6 +1,7 @@
package Reply::Plugin::ReadLine;
use strict;
use warnings;
+# ABSTRACT: use Term::ReadLine for user input
use base 'Reply::Plugin';
@@ -8,6 +9,28 @@ use File::HomeDir;
use File::Spec;
use Term::ReadLine;
+=head1 SYNOPSIS
+
+ ; .replyrc
+ [ReadLine]
+ history_file = '.hist'
+ history_length = 100
+
+=head1 DESCRIPTION
+
+This plugin uses L<Term::ReadLine> to read lines from the user. This enables
+useful features such as line editing and command history. The history will be
+persisted between runs, by default in C<~/.reply_history>, although this is
+changeable with the C<history_file> option. To limit the number of lines
+written to this file, you can use the C<history_length> option. Setting a
+C<history_length> of C<0> will disable writing history to a file entirely.
+
+NOTE: you probably want to install a reasonable L<Term::ReadLine> backend in
+order for this plugin to be very useful. L<Term::ReadLine::Gnu> is highly
+recommended if possible.
+
+=cut
+
sub new {
my $class = shift;
my %opts = @_;