use clap::Parser;
lazy_static! {
pub static ref DNTK_OPT: Opts = Opts::parse();
}
#[derive(Parser, Debug)]
#[command(
name = env!("CARGO_PKG_NAME"),
version = env!("CARGO_PKG_VERSION"),
author = env!("CARGO_PKG_AUTHORS"),
about = env!("CARGO_PKG_DESCRIPTION"),
long_about = "Command line's multi-platform interactive calculator, bc-compatible with native built-ins (sin/cos/tan, sinh/cosh/tanh, exp/ln/log, pow/sqrt/cbrt, min/max/hypot, length/scale, obase output, rand()/srand(), j(n,x)).",
)]
pub struct Opts {
#[arg(short = 's', long = "scale", default_value_t = 20, help = "Number of truncated after the decimal point")]
pub scale: usize,
#[arg(short = 'w', long = "white", help = "Set White color in a output")]
pub white: bool,
#[arg(short = 'q', long = "quiet", help = "No print information message")]
pub quiet: bool,
#[arg(long = "show-limits", help = "Print the local limits enforced by the local version of bc, and quit")]
pub show_limits: bool,
#[arg(short = 'i', long = "inject", default_value = "", help = "Pre-run inject statement to the dntk")]
pub inject: String,
#[arg(long = "once", help = "Run at only once")]
pub once: bool,
}