use clap::Parser; const VERSION: &str = env!("CARGO_PKG_VERSION"); #[derive(Parser)] #[command(about, long_about = None)] pub struct Cli { #[arg(short, long)] pub version: bool, ///Extra output mode, primarily used for debugging #[arg(long)] pub verbose: bool, ///Download and install plugin(s) #[arg(long)] pub add_plugins: Vec, //Remove plugin(s) #[arg(long)] pub remove_plugins: Vec, ///Start the shell with no rc configurations #[arg(long)] pub norc: bool, ///Disable the Luau JIT backend #[arg(long)] pub nojit: bool, } pub fn parser() -> Option { let cli_parser = Cli::parse(); if cli_parser.version { println!("Lambda Shell, version: {}.", VERSION); println!("liblambdashell, version: {}.", liblambdashell::VERSION); return None //stop here } Some(cli_parser) }