| 181 | } |
| 182 | |
| 183 | fn render_dynamic_command_help(args: &[String]) -> bool { |
| 184 | let command_args = args.get(1..).unwrap_or_default(); |
| 185 | let is_tool_command_help = matches!( |
| 186 | command_args, |
| 187 | [command, help] if command == "tool" && matches!(help.as_str(), "-h" | "--help") |
| 188 | ); |
| 189 | if !is_tool_command_help { |
| 190 | return false; |
| 191 | } |
| 192 | |
| 193 | let mut command = Cli::command(); |
| 194 | if let Some(tool) = command.find_subcommand_mut("tool") { |
| 195 | let _ = tool.print_long_help(); |
| 196 | println!(); |
| 197 | } |
| 198 | true |
| 199 | } |
| 200 | |
| 201 | async fn run(cli: Cli) -> tracedecay::errors::Result<()> { |
| 202 | let command = match cli.command { |