use clap::{Parser, Subcommand, ValueEnum};
#[derive(Parser, Debug)]
#[command(name = "bashrand")]
pub struct Args {
#[command(subcommand)]
pub command: SubCommands,
#[arg(value_enum, global = true, short, long, default_value = "both")]
pub version: Version,
#[arg(global = true, short, long, default_value = "10")]
pub number: usize,
}
#[derive(Subcommand, Debug)]
pub enum SubCommands {
Crack {
#[clap(num_args = 2..=3, required = true)]
numbers: Vec<u16>,
},
Get {
seed: u32,
#[arg(short, long, default_value = "0")]
skip: usize,
},
Seeds {
seed: u32,
},
Collide {
n: u16,
},
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum, Debug)]
pub enum Version {
Old,
New,
Both,
}