Hide commands that don't have a description

These are assumed to be internal.
This commit is contained in:
Eelco Dolstra 2017-08-29 11:52:55 +02:00
parent 05c45f301d
commit 1c58e13bee
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -50,8 +50,11 @@ void MultiCommand::printHelp(const string & programName, std::ostream & out)
out << "Available commands:\n";
Table2 table;
for (auto & command : commands)
table.push_back(std::make_pair(command.second->name(), command.second->description()));
for (auto & command : commands) {
auto descr = command.second->description();
if (!descr.empty())
table.push_back(std::make_pair(command.second->name(), descr));
}
printTable(out, table);
out << "\n";