7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2024-11-22 03:05:01 +00:00
kicad/thirdparty/argparse/samples/description_epilog_metavar.cpp
2023-12-17 21:29:05 -05:00

19 lines
590 B
C++

// SPDX-License-Identifier: MIT
#include <argparse/argparse.hpp>
int main(int argc, char *argv[]) {
argparse::ArgumentParser program("main");
program.add_argument("thing").help("Thing to use.").metavar("THING");
program.add_argument("--member")
.help("The alias for the member to pass to.")
.metavar("ALIAS");
program.add_argument("--verbose").flag();
program.add_description("Forward a thing to the next member.");
program.add_epilog("Possible things include betingalw, chiz, and res.");
program.parse_args(argc, argv);
std::cout << program << std::endl;
}