Remove the undocumented `help` subcommand.
authorJim Ingham <jingham@apple.com>
Thu, 19 Jan 2023 19:59:54 +0000 (11:59 -0800)
committerJim Ingham <jingham@apple.com>
Thu, 19 Jan 2023 20:03:06 +0000 (12:03 -0800)
This is processed by hand in CommandObjectMultiword, and is undiscoverable,
it doesn't work in all cases.  Because it is a bare word, it can't really be
extended w/o introducing the possibility of collisions as well.  If we did
want to do something like this we should add a --help flag to CommandObject.  That
way the feature would be consistent and documented.

Differential Revision: https://reviews.llvm.org/D142067

lldb/source/Commands/CommandObjectMultiword.cpp
lldb/test/API/functionalities/multiword-commands/TestMultiWordCommands.py

index 6bcf0de..bae2717 100644 (file)
@@ -174,11 +174,6 @@ bool CommandObjectMultiword::Execute(const char *args_string,
     return result.Succeeded();
   }
 
-  if (sub_command.equals_insensitive("help")) {
-    this->CommandObject::GenerateHelpText(result);
-    return result.Succeeded();
-  }
-
   if (m_subcommand_dict.empty()) {
     result.AppendErrorWithFormat("'%s' does not have any subcommands.\n",
                                  GetCommandName().str().c_str());
index e8b14d1..70a8b44 100644 (file)
@@ -19,13 +19,3 @@ class MultiwordCommandsTestCase(TestBase):
     @no_debug_info_test
     def test_empty_subcommand(self):
         self.expect("platform \"\"", error=True, substrs=["Need to specify a non-empty subcommand."])
-
-    @no_debug_info_test
-    def test_help(self):
-        # <multiword> help brings up help.
-        self.expect("platform help",
-                    substrs=["Commands to manage and create platforms.",
-                             "Syntax: platform [",
-                             "The following subcommands are supported:",
-                             "connect",
-                             "Select the current platform"])