Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Clap complete enum - name of shell

use clap::{value_parser, Parser};
use clap_complete::Shell;

#[derive(Parser, Debug)]
struct Cli {
    #[clap(long, value_parser=value_parser!(Shell))]
    shell: Shell,
}

fn main() {
    let args = Cli::parse();
    println!("{args:?}");
}