blob: 092f113b92ca8f993c012d05f4f7ddb1f3832b15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include <iostream>
#include "docopt.h"
#include "interface_reader.hpp"
static const char USAGE[] =
R"(Usage: getif [INTERFACE ...]
-h --help Show this help text.
--version Show version.
)";
int main(int argc, const char** argv) {
std::map<std::string, docopt::value> args
= docopt::docopt(USAGE,
{ argv + 1, argv + argc },
true, // show help if requested
"getif 1.0"); // version string
for(auto const& arg : args) {
std::cout << arg.first << arg.second << std::endl;
}
return 0;
}
|