MCPcopy Create free account
hub / github.com/bfgroup/Lyra / add_command

Method add_command

examples/doc_commands.cpp:84–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 bool show_help = false;
83
84 void add_command(lyra::group & g)
85 {
86 g.add_argument(lyra::command(
87 "kill", [this](const lyra::group & f) { this->do_command(f); })
88 .help("Terminate the process with the given name.")
89 .add_argument(lyra::help(show_help))
90 .add_argument(lyra::opt(signal, "signal")
91 .name("-s")
92 .name("--signal")
93 .optional()
94 .help(
95 "The signal integer to post to the running process."))
96 .add_argument(lyra::arg(process_name, "process_name")
97 .required()
98 .help(
99 "The name of the process to search and signal.")));
100 }
101
102 void do_command(const lyra::group & g)
103 {

Callers

nothing calls this directly

Calls 9

do_commandMethod · 0.95
commandClass · 0.50
helpClass · 0.50
optClass · 0.50
argClass · 0.50
helpMethod · 0.45
optionalMethod · 0.45
nameMethod · 0.45
requiredMethod · 0.45

Tested by

no test coverage detected