| 116 | static bool HandleSpecialArgument(const char* argument); |
| 117 | |
| 118 | void PrintHelp(bool allCommands) |
| 119 | { |
| 120 | PrintHelpFor(kRootCommands); |
| 121 | PrintExamples(kRootExamples); |
| 122 | |
| 123 | if (allCommands) |
| 124 | { |
| 125 | for (const CommandLineCommand* command = kRootCommands; command->Name != nullptr; command++) |
| 126 | { |
| 127 | if (command->SubCommands != nullptr) |
| 128 | { |
| 129 | size_t commandNameLength = String::lengthOf(command->Name); |
| 130 | for (size_t i = 0; i < commandNameLength; i++) |
| 131 | { |
| 132 | Console::Write("-"); |
| 133 | } |
| 134 | Console::WriteLine(); |
| 135 | Console::WriteLine(command->Name); |
| 136 | for (size_t i = 0; i < commandNameLength; i++) |
| 137 | { |
| 138 | Console::Write("-"); |
| 139 | } |
| 140 | Console::WriteLine(); |
| 141 | PrintHelpFor(command->SubCommands); |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | else |
| 146 | { |
| 147 | Console::WriteLine(kHelpText); |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | static void PrintHelpFor(const CommandLineCommand* commands) |
| 152 | { |
no test coverage detected