diff options
-rw-r--r-- | src/cli/main.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/cli/main.cpp b/src/cli/main.cpp index f6bbcc30e..f63de8fa2 100644 --- a/src/cli/main.cpp +++ b/src/cli/main.cpp @@ -21,11 +21,13 @@ std::string main_help() std::ostringstream oss; oss << "Usage: botan <cmd> <cmd-options>\n"; - oss << "Available commands: "; - std::copy(avail_commands.begin(), - avail_commands.end(), - std::ostream_iterator<std::string>(oss, " ")); - oss << "\n"; + oss << "Available commands:\n"; + + for(auto& cmd_name : avail_commands) + { + auto cmd = Botan_CLI::Command::get_cmd(cmd_name); + oss << cmd->cmd_spec() << "\n"; + } return oss.str(); } |