diff options
author | Jack Lloyd <[email protected]> | 2016-04-28 11:21:19 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-04-28 11:21:19 -0400 |
commit | 2b033c1c82d83913075e016350b90eb6e0db89a9 (patch) | |
tree | 5539142ba97c2bceca76eb32af0c7a02751f4ac2 /src/cli/main.cpp | |
parent | e6f56a82b639776282b9f4fd6a66e426ea0910d2 (diff) |
Somewhat more helpful help
Diffstat (limited to 'src/cli/main.cpp')
-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(); } |