Merged revisions 114115 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

........
r114115 | tilghman | 2008-04-14 11:32:59 -0500 (Mon, 14 Apr 2008) | 2 lines

Make tab-completion work for all cases

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@114116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-04-14 16:33:59 +00:00
parent 96e74f94f0
commit 6c96df8368

View File

@@ -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);
}