Make tab-completion work for all cases
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114115 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
ebaed1af03
commit
b7abe0b69e
|
@ -152,10 +152,10 @@ sub tab_completion {
|
|||
if ($word eq '') {
|
||||
$buffer =~ m/(\S+)\s?$/;
|
||||
$lastword = $1;
|
||||
print STDERR "\n\nlastword=\"$lastword\"\n";
|
||||
#print STDERR "\n\nlastword=\"$lastword\"\n";
|
||||
}
|
||||
|
||||
my $res = send_command("_command matchesarray \"$buffer\" \"$word\"\n");
|
||||
my $res = send_command("_command matchesarray \"$buffer\" \"$word\"");
|
||||
foreach my $item (split /\s+/, $res) {
|
||||
$items{$item}++ unless ($item eq '_EOF_' or $item eq '' or $item eq $lastword);
|
||||
}
|
||||
|
|
Reference in New Issue