| 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 | { |