Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #54 from AntelopeIO/sbailey/update_main_help
Browse files Browse the repository at this point in the history
Add `--help-all` flag and make top level help consistent with periods.
  • Loading branch information
ScottBailey authored Apr 28, 2023
2 parents f9cf2b0 + e1bca66 commit e47030c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,17 @@ int main(int argc, char** argv) {

CLI::App app{"Antelope Smart Contract Project Management Tool", app_name};

// Explicit help flags:
app.set_help_flag("-h,--help","Print this help message and exit.");
app.set_help_all_flag("--help-all","Expanded help with subcomands.");

// Add version flag with callback here.
app.add_flag_callback("-V,--version",
[&app]() {
std::cout << app.get_name() << " v" << antler::system::version::full() << std::endl;
std::exit(0); // Successful exit MUST happen here.
},
"get the version of antler-proj");
"Get the version of antler-proj.");

runner<antler::add_to_project,
antler::build_project,
Expand Down

0 comments on commit e47030c

Please sign in to comment.