diff --git a/lib/rex/ui/text/dispatcher_shell.rb b/lib/rex/ui/text/dispatcher_shell.rb index a2819d0dc0..66f73923cc 100644 --- a/lib/rex/ui/text/dispatcher_shell.rb +++ b/lib/rex/ui/text/dispatcher_shell.rb @@ -359,7 +359,7 @@ module DispatcherShell # def tab_complete(str) # Check trailing whitespace so we can tell 'x' from 'x ' - str_match = str.match(/\s+$/) + str_match = str.match(/[^\\]([\\]{2})*\s+$/) str_trail = (str_match.nil?) ? '' : str_match[0] # Split the line up by whitespace into words