kicad/thirdparty/argparse/samples/description_epilog_metavar.cpp

19 lines
590 B
C++
Raw Normal View History

2022-11-13 16:50:27 +00:00
// 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");
2023-12-18 02:29:05 +00:00
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;
}