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 @@ -1009,9 +1009,12 @@ protected: void IOHandlerActivated(IOHandler &io_handler) override { + if (!io_handler.GetIsInteractive() && !io_handler.GetIsRealTerminal()) + // Don't print instructions during batch execution, such as .lldbinit. + return; 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();