diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-05-30 06:24:32 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-05-30 06:24:32 -0500 |
commit | c3675ce37cf430b8763d078e3eacf820b5d8c6b3 (patch) | |
tree | 280b2b2ccf0f6b639ee36c2879a095abf6794f06 | |
parent | 3e5092c171bc4bf0b67c29486ae068bdc497acd8 (diff) | |
download | reply-c3675ce37cf430b8763d078e3eacf820b5d8c6b3.tar.gz reply-c3675ce37cf430b8763d078e3eacf820b5d8c6b3.zip |
command support
-rw-r--r-- | lib/Reply.pm | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |