Skip to content

Commit

Permalink
add -t/--type argument
Browse files Browse the repository at this point in the history
takes a comma-delimited list of user-requested file types
  • Loading branch information
chrissimpkins committed Dec 18, 2023
1 parent a7461d9 commit 93d7e14
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/lib/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ pub struct Args {
pub depth: Option<usize>,

/// Filter the output by gitignore syntax glob patterns
#[arg(short, long, value_delimiter = ',', help_heading = "Filters")]
#[arg(
short,
long,
value_delimiter = ',',
conflicts_with = "default_type",
help_heading = "Filters"
)]
pub glob: Option<Vec<String>>,

/// Show hidden dot files and dot directories
Expand Down Expand Up @@ -81,4 +87,14 @@ pub struct Args {
help_heading = "Sorting"
)]
pub parallel: bool,

/// Filter the output by one or more comma separated file type names
#[arg(
short = 't',
long = "type",
value_delimiter = ',',
conflicts_with = "glob",
help_heading = "Filters"
)]
pub default_type: Option<Vec<String>>,
}

0 comments on commit 93d7e14

Please sign in to comment.