diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-08-29T09·52+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-08-29T09·52+0200 |
commit | 1c58e13bee6715c668e93cd4ec93bc5d5fd1a4ad (patch) | |
tree | 9fedcfec5f269063411ddd570fea16ace3971ce8 | |
parent | 05c45f301de6f4b5528969b97b9cc1891b1a985c (diff) |
Hide commands that don't have a description
These are assumed to be internal.
-rw-r--r-- | src/nix/command.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nix/command.cc b/src/nix/command.cc index e88c834abc50..f90d848f2a40 100644 --- a/src/nix/command.cc +++ b/src/nix/command.cc @@ -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"; |