chore: deduplicate builtin help action generation.

This commit is contained in:
2026-03-16 19:26:44 +04:00
parent ddb2d0bf10
commit 2d4dc123ae
6 changed files with 122 additions and 55 deletions

View File

@@ -25,13 +25,7 @@ namespace argument_parser {
}
}
add_argument({{flags::ShortArgument, "h"},
{flags::LongArgument, "help"},
{flags::Action, helpers::make_non_parametered_action([this]() {
this->display_help(this->current_conventions());
std::exit(0);
})},
{flags::HelpText, "Prints this help text."}});
prepare_help_flag();
}
} // namespace v2
} // namespace argument_parser