No tab-completion for empty input
Old terminal takes about 1 minute to scroll the >9000 options...
This commit is contained in:
parent
da043ba2df
commit
c3b0b86c97
1 changed files with 1 additions and 0 deletions
1
revbank
1
revbank
|
@ -60,6 +60,7 @@ sub prompt {
|
||||||
my @matches;
|
my @matches;
|
||||||
$readline->Attribs->{completion_entry_function} = sub {
|
$readline->Attribs->{completion_entry_function} = sub {
|
||||||
my ($word, $state) = @_;
|
my ($word, $state) = @_;
|
||||||
|
return undef if $word eq "";
|
||||||
@matches = grep /^\Q$word\E/i, @$completions if $state == 0;
|
@matches = grep /^\Q$word\E/i, @$completions if $state == 0;
|
||||||
return shift @matches;
|
return shift @matches;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue