use clap::Parser;
#[derive(Parser, Debug)]
#[command(
version,
about,
help_template = "\
{before-help}{name} v{version} - {about-with-newline}
{usage-heading} {usage}
{all-args}{after-help}"
)]
pub struct Options {
#[arg(short, long)]
pub in_place: bool,
#[arg(short = 's', long = "strings", value_name = "STRINGS")]
pub literal_mode: bool,
#[arg(short, long)]
pub case_insensitive: bool,
#[arg(short, long)]
pub word: bool,
#[arg(short, long)]
pub dot_match_newline: bool,
#[arg(short, long)]
pub no_multiline: bool,
#[arg(allow_hyphen_values = true, value_name = "SEARCH")]
pub find: String,
#[arg(short = 'l', long = "limit", value_name = "MAX", default_value_t)]
pub replacements: usize,
#[arg(allow_hyphen_values = true, value_name = "REPLACEMENT")]
pub replace_with: String,
#[arg(value_name = "FILE")]
pub files: Vec<std::path::PathBuf>,
}