From 2a0e3690dba0553cd8d8bee7a15d74f277be511e Mon Sep 17 00:00:00 2001 From: Spencer McIntyre Date: Wed, 24 Apr 2019 11:01:23 -0400 Subject: [PATCH] Close unbalanced quotes when tab completing --- lib/rex/ui/text/dispatcher_shell.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rex/ui/text/dispatcher_shell.rb b/lib/rex/ui/text/dispatcher_shell.rb index cabb762515..74ef72ad17 100644 --- a/lib/rex/ui/text/dispatcher_shell.rb +++ b/lib/rex/ui/text/dispatcher_shell.rb @@ -425,7 +425,7 @@ module DispatcherShell word.downcase.start_with?(str.downcase) || word =~ /^#{str}/i # Prepend the rest of the command (or it all gets replaced!) }.map { |word| - word = quote.nil? ? word.gsub(' ', '\ ') : quote.dup << word + word = quote.nil? ? word.gsub(' ', '\ ') : quote.dup << word << quote.dup tab_words.dup.push(word).join(' ') } end