Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use existing input object when calling init_tab_complete #19711

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/msf/ui/console/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def initialize(prompt = DefaultPrompt, prompt_char = DefaultPromptChar, opts = {
# Initialize the user interface to use a different input and output
# handle if one is supplied
input = opts['LocalInput']
input ||= Rex::Ui::Text::Input::Stdio.new
input ||= Rex::Ui::Text::Input::Readline.new

if !opts['Readline']
input.disable_readline
Expand Down
3 changes: 1 addition & 2 deletions lib/rex/ui/text/shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ def initialize(prompt, prompt_char = '>', histfile = nil, framework = nil, name
def init_tab_complete
if (self.input and self.input.supports_readline)
# Unless cont_flag because there's no tab complete for continuation lines
self.input = Input::Readline.new(lambda { |str| tab_complete(str) unless cont_flag })
self.input.output = self.output
self.input.reset_tab_completion(lambda { |str| tab_complete(str) unless cont_flag })
end
end

Expand Down
Loading