From 72b52a37596b97fb3dc8837c907adbbc74390042 Mon Sep 17 00:00:00 2001 From: theskywinds Date: Wed, 25 Jun 2025 12:53:22 +0200 Subject: [PATCH] Added unfinished prototype of the format helper flag --- src/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index d1a3c81..0fd0c63 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,6 @@ #include #include + #include "CLI11.hpp" #include "../include/distime.h" @@ -17,11 +18,17 @@ int main(int argc, char **argv) { app.usage("USAGE: distime [OPTIONS]"); char timeFormat {}; - app.add_option("-f, --format", timeFormat, "Dictates which format to output as") ->multi_option_policy (CLI::MultiOptionPolicy::Throw) ->default_val('f'); + auto formatHelp { [] () { + std::cout + << "" + } }; + + app.add_flag_callback("-fh, --format-help", , "Help with formats"); + CLI11_PARSE(app, argc, argv); validateTimeFormatSelection(timeFormat);