Added unfinished prototype of the format helper flag
This commit is contained in:
parent
91d5b4d0d1
commit
72b52a3759
|
|
@ -1,5 +1,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "CLI11.hpp"
|
#include "CLI11.hpp"
|
||||||
#include "../include/distime.h"
|
#include "../include/distime.h"
|
||||||
|
|
||||||
|
|
@ -17,11 +18,17 @@ int main(int argc, char **argv) {
|
||||||
app.usage("USAGE: distime [OPTIONS]");
|
app.usage("USAGE: distime [OPTIONS]");
|
||||||
|
|
||||||
char timeFormat {};
|
char timeFormat {};
|
||||||
|
|
||||||
app.add_option("-f, --format", timeFormat, "Dictates which format to output as")
|
app.add_option("-f, --format", timeFormat, "Dictates which format to output as")
|
||||||
->multi_option_policy (CLI::MultiOptionPolicy::Throw)
|
->multi_option_policy (CLI::MultiOptionPolicy::Throw)
|
||||||
->default_val('f');
|
->default_val('f');
|
||||||
|
|
||||||
|
auto formatHelp { [] () {
|
||||||
|
std::cout
|
||||||
|
<< ""
|
||||||
|
} };
|
||||||
|
|
||||||
|
app.add_flag_callback("-fh, --format-help", , "Help with formats");
|
||||||
|
|
||||||
CLI11_PARSE(app, argc, argv);
|
CLI11_PARSE(app, argc, argv);
|
||||||
|
|
||||||
validateTimeFormatSelection(timeFormat);
|
validateTimeFormatSelection(timeFormat);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user