mirror of
https://github.com/bootandy/dust.git
synced 2025-12-05 20:40:11 -08:00
Dislike the idea of passing a string into build_cli. By removing a call to default_value we can side-step the problem. Downside is we lose the error log if a user provides a bad depth
19 lines
496 B
Rust
19 lines
496 B
Rust
use clap_complete::{generate_to, shells::*};
|
|
use std::io::Error;
|
|
|
|
include!("src/cli.rs");
|
|
|
|
fn main() -> Result<(), Error> {
|
|
let outdir = "completions";
|
|
let app_name = "dust";
|
|
let mut cmd = build_cli();
|
|
|
|
generate_to(Bash, &mut cmd, app_name, outdir)?;
|
|
generate_to(Zsh, &mut cmd, app_name, outdir)?;
|
|
generate_to(Fish, &mut cmd, app_name, outdir)?;
|
|
generate_to(PowerShell, &mut cmd, app_name, outdir)?;
|
|
generate_to(Elvish, &mut cmd, app_name, outdir)?;
|
|
|
|
Ok(())
|
|
}
|