Allow hook_prompt to mutate the prompt, like before, and use that
This functionality was accidentally broken by eed0db78
Also: ignore readline terminal sequence (\x01...\x02) in detection of ">"
This commit is contained in:
parent
5e91aaff3d
commit
16d530ae16
3 changed files with 16 additions and 7 deletions
|
@ -18,11 +18,13 @@ sub _read_file($fn) {
|
|||
readline *ARGV;
|
||||
}
|
||||
|
||||
sub call_hooks($hook, @args) {
|
||||
sub call_hooks {
|
||||
my $hook = shift;
|
||||
my $method = "hook_$hook";
|
||||
|
||||
for my $class (@plugins) {
|
||||
if ($class->can($method)) {
|
||||
my ($rv, @message) = $class->$method(@args);
|
||||
my ($rv, @message) = $class->$method(@_);
|
||||
|
||||
if (defined $rv and ref $rv) {
|
||||
main::abort(@message) if $rv == ABORT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue