Skip to content

Commit

Permalink
Improve command system.
Browse files Browse the repository at this point in the history
  • Loading branch information
demon386 committed Oct 18, 2015
1 parent 5b9c68c commit cf839fa
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions command.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void add_subcommand(CommandNameT command_name,
po::variables_map parse_args(int argc, char* argv[]) {
// Inspired by
// http://www.hitmaroc.net/553491-4141-how-implement-subcommands-using-boost-program-options.html
po::options_description commands("Subcommands");
po::options_description commands("Subcommands: init,read,write");

commands.add_options()
("help,h", "Help screen")
Expand All @@ -63,10 +63,6 @@ po::variables_map parse_args(int argc, char* argv[]) {

po::store(parsed, vm);

if (vm.count("help")) {
std::cout << commands << std::endl;
std::exit(0);
}
// @todo should exists a better way to judge whether the first positional
// cmd is given.
try {
Expand Down

0 comments on commit cf839fa

Please sign in to comment.