use clap::CommandFactory; use clap_complete::{generate_to, Shell}; include!("src/cli.rs"); fn main() { let var = std::env::var_os("SHELL_COMPLETIONS_DIR").or_else(|| std::env::var_os("OUT_DIR")); let outdir = match var { None => return, Some(outdir) => outdir, }; let mut cmd = Args::command(); for shell in [Shell::Bash, Shell::Fish, Shell::Zsh] { generate_to(shell, &mut cmd, "timewall", &outdir).unwrap(); } }