25 lines
763 B
Rust
25 lines
763 B
Rust
use clap::Clap;
|
|
use std::path::PathBuf;
|
|
use smartstring::alias::String;
|
|
|
|
#[derive(Clap, Debug)]
|
|
pub struct Parameters {
|
|
/// Only examine files with these extensions (Comma-separated list)
|
|
#[clap(short, long, use_delimiter = true)]
|
|
pub extensions: Option<Vec<String>>,
|
|
|
|
/// Don't skip hidden files and directories
|
|
#[clap(short, long)]
|
|
pub scan_hidden: bool,
|
|
|
|
/// Output format to use. See "--help formats" for more information.
|
|
#[clap(short, long, default_value="script", possible_values = &["script", "text"])]
|
|
pub output_format: String,
|
|
|
|
/// Directory to process
|
|
// TODO: right now this can only take a single directory - should this be improved?
|
|
#[clap(name = "DIR", default_value = ".", parse(from_os_str))]
|
|
// dirs: PathBuf
|
|
pub dirs: PathBuf,
|
|
}
|