Skip to content

Commit a63fa68

Browse files
authored
Land rapid7#19716 Revert "Use existing input object when calling init_tab_complete"
2 parents 65612d6 + 6167596 commit a63fa68

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/msf/ui/console/driver.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def initialize(prompt = DefaultPrompt, prompt_char = DefaultPromptChar, opts = {
107107
# Initialize the user interface to use a different input and output
108108
# handle if one is supplied
109109
input = opts['LocalInput']
110-
input ||= Rex::Ui::Text::Input::Readline.new
110+
input ||= Rex::Ui::Text::Input::Stdio.new
111111

112112
if !opts['Readline']
113113
input.disable_readline

lib/rex/ui/text/shell.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def initialize(prompt, prompt_char = '>', histfile = nil, framework = nil, name
6666
def init_tab_complete
6767
if (self.input and self.input.supports_readline)
6868
# Unless cont_flag because there's no tab complete for continuation lines
69-
self.input.reset_tab_completion(lambda { |str| tab_complete(str) unless cont_flag })
69+
self.input = Input::Readline.new(lambda { |str| tab_complete(str) unless cont_flag })
70+
self.input.output = self.output
7071
end
7172
end
7273

0 commit comments

Comments
 (0)