diff options
Diffstat (limited to 'lib/Reply/Plugin/ReadLine.pm')
-rw-r--r-- | lib/Reply/Plugin/ReadLine.pm | 23 |
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 = @_; |