diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index cb6acfc9c29a9..afc1753e21c46 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -3702,12 +3702,10 @@ CommandInterpreter::ResolveCommandImpl(std::string &command_line, done = static_cast(cmd_obj); } else { StreamString error_msg; - error_msg.Printf("Ambiguous command '%s'. Possible matches:\n", + error_msg.Printf("ambiguous command '%s'. Possible matches:\n", next_word.c_str()); - - for (uint32_t i = 0; i < num_matches; ++i) { + for (uint32_t i = 0; i < num_matches; ++i) error_msg.Printf("\t%s\n", matches.GetStringAtIndex(i)); - } result.AppendError(error_msg.GetString()); } } else { diff --git a/lldb/test/API/functionalities/abbreviation/TestAbbreviations.py b/lldb/test/API/functionalities/abbreviation/TestAbbreviations.py index 5dd4f6bee56a3..e5bbb9ee2eb9d 100644 --- a/lldb/test/API/functionalities/abbreviation/TestAbbreviations.py +++ b/lldb/test/API/functionalities/abbreviation/TestAbbreviations.py @@ -41,7 +41,7 @@ def test_command_abbreviations_and_aliases(self): # "pl" could be "platform" or "plugin". command_interpreter.ResolveCommand("pl", result) self.assertFalse(result.Succeeded()) - self.assertTrue(result.GetError().startswith("error: Ambiguous command")) + self.assertTrue(result.GetError().startswith("error: ambiguous command")) # Make sure an unabbreviated command is not mangled. command_interpreter.ResolveCommand( diff --git a/lldb/test/API/functionalities/ambigous_commands/TestAmbiguousCommands.py b/lldb/test/API/functionalities/ambigous_commands/TestAmbiguousCommands.py index 31b67d72ce469..f114820d16347 100644 --- a/lldb/test/API/functionalities/ambigous_commands/TestAmbiguousCommands.py +++ b/lldb/test/API/functionalities/ambigous_commands/TestAmbiguousCommands.py @@ -24,7 +24,7 @@ def test_ambiguous_command_with_alias(self): self.assertFalse(result.Succeeded()) self.assertEqual( result.GetError(), - "error: Ambiguous command 'co'. Possible matches:\n\tcommand\n\tcontinue\n\tcorefile\n", + "error: ambiguous command 'co'. Possible matches:\n\tcommand\n\tcontinue\n\tcorefile\n", ) command_interpreter.HandleCommand("command unalias continue", result) diff --git a/lldb/test/API/functionalities/wrong_commands/TestWrongCommands.py b/lldb/test/API/functionalities/wrong_commands/TestWrongCommands.py index 25f95f3061eb4..941a909aa93aa 100644 --- a/lldb/test/API/functionalities/wrong_commands/TestWrongCommands.py +++ b/lldb/test/API/functionalities/wrong_commands/TestWrongCommands.py @@ -18,7 +18,7 @@ def test_ambiguous_command(self): command_interpreter.HandleCommand("g", result) self.assertFalse(result.Succeeded()) self.assertRegex( - result.GetError(), "error: Ambiguous command 'g'. Possible matches:" + result.GetError(), "error: ambiguous command 'g'. Possible matches:" ) self.assertRegex(result.GetError(), "gui") self.assertRegex(result.GetError(), "gdb-remote")