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

Add --help-all flag and make top level help consistent with periods. #54

Merged
merged 1 commit into from
Apr 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tools/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,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); // Succesfull exit MUST happen here.
},
"get the version of antler-proj");
"Get the version of antler-proj.");


runner<antler::add_to_project,
Expand Down