Write the completion script for `cmd` to stdout. `cmd` is supplied by the caller (the top-level `Cli::command()`), since the completion generator needs the full command tree.
(&self, mut cmd: clap::Command)
| 42 | /// `cmd` is supplied by the caller (the top-level `Cli::command()`), since |
| 43 | /// the completion generator needs the full command tree. |
| 44 | pub fn generate(&self, mut cmd: clap::Command) -> CliResult<()> { |
| 45 | let bin = cmd.get_name().to_string(); |
| 46 | clap_complete::aot::generate(self.shell, &mut cmd, bin, &mut std::io::stdout()); |
| 47 | Ok(()) |
| 48 | } |
| 49 | } |