thqm 0.2.0

A simple HTTP server to serve a dynamic menu for your scripts over the network.
use clap::{CommandFactory, ValueEnum};
use clap_complete::{generate_to, Shell};
use std::env;
use std::io::Error;

include!("src/cli.rs");

fn main() -> Result<(), Error> {
    let completions_dir = env::current_dir()?.join("completions");

    let mut cmd = Arguments::command();

    for &shell in Shell::value_variants() {
        let path = generate_to(shell, &mut cmd, "thqm", &completions_dir)?;
        println!("cargo:warning=completion file is generated: {path:?}");
    }

    Ok(())
}