50 void register_opt(std::string name, std::optional<std::string>
args, std::string description);
68 bool has_option(
const std::string_view &option_name);
76 std::string_view
get_option(
const std::string_view &option_name);
namespace for cli utilities
bool is_help_mode()
Check if the help mode is enabled.
int argc
supplied argc from main
bool has_option(const std::string_view &option_name)
Check if an option is present.
char ** argv
supplied argv from main
std::string_view get_option(const std::string_view &option_name)
Get the value of an option.
std::vector< std::string_view > args
Executable argument list (mapped from argv)
char ** get_argv()
Get the command line arguments.
int get_argc()
Get the number of command line arguments.
void init(int argc, char *argv[])
Initialize the command line option parser. We also process generic options in this call (color detect...
void print_completion_zsh()
print zsh completion script to be sourced
void register_opt(std::string name, std::optional< std::string > args, std::string description)
Register a command line option.
void print_help()
Print the help message.