aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/cli.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-10-24 14:38:09 -0400
committerJack Lloyd <[email protected]>2017-10-24 14:38:09 -0400
commit39314a242f1a98d7493410ebddd449fa57813bc2 (patch)
tree09ec1e886102b9ec38d80066e5fc2c416a3a46d3 /src/cli/cli.cpp
parentc2830ddf08b41a9f5f2a472e0cc488c9c358fdb2 (diff)
Tweak help output a bit
Diffstat (limited to 'src/cli/cli.cpp')
-rw-r--r--src/cli/cli.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp
index f23c3574d..e3ff2a75f 100644
--- a/src/cli/cli.cpp
+++ b/src/cli/cli.cpp
@@ -21,10 +21,14 @@ Command::Command(const std::string& cmd_spec) : m_spec(cmd_spec)
Command::~Command() { /* for unique_ptr */ }
+std::string Command::cmd_name() const
+ {
+ return m_spec.substr(0, m_spec.find(' '));
+ }
+
std::string Command::help_text() const
{
- return "Usage: " + m_spec +
- "\n\nAll commands support --verbose --help --output= --error-output= --rng-type= --drbg-seed=";
+ return "Usage: " + m_spec;
}
int Command::run(const std::vector<std::string>& params)
@@ -68,7 +72,7 @@ int Command::run(const std::vector<std::string>& params)
}
this->go();
- return 0;
+ return m_return_code;
}
catch(CLI_Usage_Error& e)
{