Skip to content

Commit

Permalink
[cli] Document settings keys in help for get cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
ricab committed Sep 27, 2019
1 parent 8f01157 commit 7245eab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/cli/cmd/get.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ QString cmd::Get::short_help() const

QString cmd::Get::description() const
{
return QStringLiteral("Get the configuration setting corresponding to the given key");
auto desc = QStringLiteral("Get the configuration setting corresponding to the given key.\n\n"
"Keys:");
const auto keys = Settings::instance().keys();

return std::accumulate(cbegin(keys), cend(keys), desc, [](const auto& a, const auto& b) { return a + "\n " + b; });
}

mp::ParseCode cmd::Get::parse_args(mp::ArgParser* parser)
Expand Down

0 comments on commit 7245eab

Please sign in to comment.