summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-05-30 06:24:32 -0500
committerJesse Luehrs <doy@tozt.net>2013-05-30 06:24:32 -0500
commitc3675ce37cf430b8763d078e3eacf820b5d8c6b3 (patch)
tree280b2b2ccf0f6b639ee36c2879a095abf6794f06
parent3e5092c171bc4bf0b67c29486ae068bdc497acd8 (diff)
downloadreply-c3675ce37cf430b8763d078e3eacf820b5d8c6b3.tar.gz
reply-c3675ce37cf430b8763d078e3eacf820b5d8c6b3.zip
command support
-rw-r--r--lib/Reply.pm4
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;
}