From 855f8b0752d3358c9030d5356c4ca0a25ecec8d9 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Tue, 11 Jan 2011 18:55:37 +0000 Subject: [PATCH] fix more silly tab completion behavior git-svn-id: file:///home/svn/framework3/trunk@11546 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/ui/console/command_dispatcher.rb | 4 ++-- .../post/meterpreter/ui/console/command_dispatcher/core.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/msf/ui/console/command_dispatcher.rb b/lib/msf/ui/console/command_dispatcher.rb index d23cdffc39..a3ee24f7f7 100644 --- a/lib/msf/ui/console/command_dispatcher.rb +++ b/lib/msf/ui/console/command_dispatcher.rb @@ -88,11 +88,11 @@ module CommandDispatcher if (commands.include?(words[0])) if (self.respond_to?('cmd_'+words[0]+'_tabs')) res = self.send('cmd_'+words[0]+'_tabs', str, words) - return nil if res.nil? + return [] if res.nil? items.concat(res) else # Avoid the default completion list for known commands - return nil + return [] end end diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb index fbbbda671c..ab71d685ce 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb @@ -595,11 +595,11 @@ class Console::CommandDispatcher::Core if (commands.include?(words[0])) if (self.respond_to?('cmd_'+words[0]+'_tabs')) res = self.send('cmd_'+words[0]+'_tabs', str, words) - return nil if res.nil? + return [] if res.nil? items.concat(res) else # Avoid the default completion list for known commands - return nil + return [] end end