Code

 avatar
ketronix
c_cpp
a year ago
500 B
3
Indexable
Never
#include <iostream>
#include "cli_parser/CLI11.hpp"

int main(int argc, char **argv) {

    /// [Intro]
    CLI::App app{"AppImage Installer"};
    app.require_subcommand(1);
    /// [Intro]

    /// [Commit]
    auto commit = app.add_subcommand("install", "install the package");

    std::string commit_message;

    commit->callback([&]() { std::cout << "install message: " << commit_message; });
    /// [Commit]

    /// [Parse]
    CLI11_PARSE(app, argc, argv);
    return 0;
    /// [Parse]
}