Readline interface: Difference between revisions
m
→{{header|Perl}}: future-proof for 5.36
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: future-proof for 5.36) |
||
Line 805:
use POSIX;
my $term =
my $attribs = $term->Attribs;
$attribs->{completion_append_character} = ' ';
Line 819:
my $command = $term->readline('> ');
$term->addhistory($command) if $command;
}
Line 831:
sub attempt_perl_completion {
my ($text, $line, $start, $end) = @_;
}
Line 856:
return $entry if ($entry =~ /^\Q$text/);
}
}</syntaxhighlight>
|