| 10 | #include <vector> |
| 11 | |
| 12 | int main(int argc, char **argv) { |
| 13 | |
| 14 | CLI::App app("Prefix command app"); |
| 15 | app.prefix_command(CLI::PrefixCommandMode::On); |
| 16 | |
| 17 | std::vector<int> vals; |
| 18 | app.add_option("--vals,-v", vals)->expected(-1); |
| 19 | |
| 20 | CLI11_PARSE(app, argc, argv); |
| 21 | |
| 22 | std::vector<std::string> more_comms = app.remaining(); |
| 23 | |
| 24 | std::cout << "Prefix"; |
| 25 | for(int v : vals) |
| 26 | std::cout << ": " << v << " "; |
| 27 | |
| 28 | std::cout << '\n' << "Remaining commands: "; |
| 29 | |
| 30 | for(const auto &com : more_comms) |
| 31 | std::cout << com << " "; |
| 32 | std::cout << '\n'; |
| 33 | |
| 34 | return 0; |
| 35 | } |
nothing calls this directly
no test coverage detected