From c3675ce37cf430b8763d078e3eacf820b5d8c6b3 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 30 May 2013 06:24:32 -0500 Subject: command support --- lib/Reply.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Reply.pm b/lib/Reply.pm index be79ab8..46e1514 100644 --- a/lib/Reply.pm +++ b/lib/Reply.pm @@ -105,6 +105,10 @@ sub _read { my $prompt = $self->_wrapped_plugin('prompt'); my ($line) = $self->_wrapped_plugin('read_line', $prompt); + if (defined($line) && $line =~ s/^#(\w+)(?:\s+|$)//) { + ($line) = $self->_chained_plugin("command_\L$1", $line); + } + return $line; } -- cgit v1.2.3-54-g00ecf