Skip to content

Commit 1c58e13

Browse files
committed
Hide commands that don't have a description
These are assumed to be internal.
1 parent 05c45f3 commit 1c58e13

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/nix/command.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ void MultiCommand::printHelp(const string & programName, std::ostream & out)
5050
out << "Available commands:\n";
5151

5252
Table2 table;
53-
for (auto & command : commands)
54-
table.push_back(std::make_pair(command.second->name(), command.second->description()));
53+
for (auto & command : commands) {
54+
auto descr = command.second->description();
55+
if (!descr.empty())
56+
table.push_back(std::make_pair(command.second->name(), descr));
57+
}
5558
printTable(out, table);
5659

5760
out << "\n";

0 commit comments

Comments
 (0)