Support control character escapes, add :AllChars attribute
Also: - fix warning in RevBank::Plugin->Tab when there are attrs but no :Tab - reconstruct quotes and escapes in prompt on retry
This commit is contained in:
parent
573731cb61
commit
0cd178d950
2 changed files with 34 additions and 5 deletions
|
@ -22,7 +22,7 @@ sub Tab($self, $method) {
|
|||
ref $method ? $method : $self->can($method)
|
||||
) or return;
|
||||
|
||||
my ($tab) = $attr =~ /Tab \( (.*?) \)/x;
|
||||
my ($tab) = $attr =~ /Tab \( (.*?) \)/x or return;
|
||||
for my $keyword (split /\s*,\s*/, $tab) {
|
||||
if ($keyword =~ /^&(.*)/) {
|
||||
my $method = $1;
|
||||
|
@ -44,6 +44,14 @@ sub Tab($self, $method) {
|
|||
return keys %completions;
|
||||
}
|
||||
|
||||
sub AllChars($self, $method) {
|
||||
my $attr = attributes::get(
|
||||
ref $method ? $method : $self->can($method)
|
||||
) or return;
|
||||
|
||||
return !!($attr =~ /AllChars/);
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue