chore(cli): Migrate to Derive API

Change the definition of CLI from the Builder API to the Derive API.
This commit is contained in:
Shun Sakai
2025-05-15 21:11:41 +09:00
committed by andy.boot
parent 6a14d7e8b3
commit 702f0f0fe9
12 changed files with 514 additions and 538 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
use clap::CommandFactory;
use clap_complete::{generate_to, shells::*};
use clap_mangen::Man;
use std::fs::File;
@@ -9,7 +10,7 @@ include!("src/cli.rs");
fn main() -> Result<(), Error> {
let outdir = "completions";
let app_name = "dust";
let mut cmd = build_cli();
let mut cmd = Cli::command();
generate_to(Bash, &mut cmd, app_name, outdir)?;
generate_to(Zsh, &mut cmd, app_name, outdir)?;