Files
pbpctrl/cli/build.rs
CGH0S7 6675986579
Some checks failed
Rust / Clippy (push) Has been cancelled
Rust / Test (nightly) (push) Has been cancelled
Rust / Test (stable) (push) Has been cancelled
first commit
2026-01-04 16:50:19 +08:00

22 lines
551 B
Rust

use std::env;
use clap::CommandFactory;
use clap_complete::shells;
#[allow(dead_code)]
#[path = "src/cli.rs"]
mod cli;
use cli::*;
fn main() {
let outdir = env::var_os("CARGO_TARGET_DIR")
.or_else(|| env::var_os("OUT_DIR"))
.unwrap();
let mut cmd = Args::command();
clap_complete::generate_to(shells::Bash, &mut cmd, "pbpctrl", &outdir).unwrap();
clap_complete::generate_to(shells::Zsh, &mut cmd, "pbpctrl", &outdir).unwrap();
clap_complete::generate_to(shells::Fish, &mut cmd, "pbpctrl", &outdir).unwrap();
}