Index: include/lldb/Core/IOHandler.h =================================================================== --- include/lldb/Core/IOHandler.h +++ include/lldb/Core/IOHandler.h @@ -200,6 +200,8 @@ virtual void IOHandlerActivated(IOHandler &io_handler) {} + virtual void IOHandlerActivatedInteractively(IOHandler &io_handler) {} + virtual void IOHandlerDeactivated(IOHandler &io_handler) {} virtual int IOHandlerComplete(IOHandler &io_handler, const char *current_line, Index: packages/Python/lldbsuite/test/functionalities/command_regex/TestCommandRegex.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/command_regex/TestCommandRegex.py +++ packages/Python/lldbsuite/test/functionalities/command_regex/TestCommandRegex.py @@ -24,7 +24,7 @@ """Test a simple scenario of 'command regex' invocation and subsequent use.""" import pexpect prompt = "(lldb) " - regex_prompt = "Enter one of more sed substitution commands in the form: 's///'.\r\nTerminate the substitution list with an empty line.\r\n" + regex_prompt = "Enter one or more sed substitution commands in the form: 's///'.\r\nTerminate the substitution list with an empty line.\r\n" regex_prompt1 = "\r\n" child = pexpect.spawn('%s %s' % Index: source/Commands/CommandObjectCommands.cpp =================================================================== --- source/Commands/CommandObjectCommands.cpp +++ source/Commands/CommandObjectCommands.cpp @@ -980,10 +980,10 @@ ~CommandObjectCommandsAddRegex() override = default; protected: - void IOHandlerActivated(IOHandler &io_handler) override { + void IOHandlerActivatedInteractively(IOHandler &io_handler) override { StreamFileSP output_sp(io_handler.GetOutputStreamFile()); if (output_sp) { - output_sp->PutCString("Enter one of more sed substitution commands in " + output_sp->PutCString("Enter one or more sed substitution commands in " "the form: 's///'.\nTerminate the " "substitution list with an empty line.\n"); output_sp->Flush(); Index: source/Core/IOHandler.cpp =================================================================== --- source/Core/IOHandler.cpp +++ source/Core/IOHandler.cpp @@ -333,6 +333,8 @@ void IOHandlerEditline::Activate() { IOHandler::Activate(); m_delegate.IOHandlerActivated(*this); + if (GetIsInteractive()) + m_delegate.IOHandlerActivatedInteractively(*this); } void IOHandlerEditline::Deactivate() {