summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2023-05-04 19:43:08 -0500
committerToby Vincent <tobyv13@gmail.com>2023-05-04 19:43:08 -0500
commit5da4fb25f9bb72771c7f2798daa6339be0bc3900 (patch)
treec30639c7a95e1d94baff498d247eed43fdb3728e /src/config.rs
parent589cd987217755e1da7acbc304c373a75a9f7db5 (diff)
refactor: join iterators into a single walk
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/config.rs b/src/config.rs
index 61a0778..b87f88d 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -12,21 +12,24 @@ pub struct Config {
pub paths: Vec<PathBuf>,
/// (UNIMPLEMENTED) Additional directories to add to the sorted output.
- #[arg(long)]
- pub add: Vec<PathBuf>,
+ #[arg(long = "project", short = 'P')]
+ pub projects: Vec<PathBuf>,
#[command(flatten)]
- pub filters: Filters,
+ pub search: Search,
#[command(flatten)]
pub verbosity: Verbosity,
}
#[derive(Debug, Default, Clone, Args)]
-pub struct Filters {
- /// Match all child directories.
- #[arg(short, long)]
- pub all: bool,
+pub struct Search {
+ /// Recurse into hidden directories.
+ ///
+ /// Traverse into hidden directories while searching. A directory is considered hidden
+ /// if its name starts with a `.` sign (dot). If `--max-depth` is 0, this has no effect.
+ #[arg(long)]
+ pub hidden: bool,
/// Max depth to recurse.
///
@@ -34,12 +37,15 @@ pub struct Filters {
#[arg(short = 'd', long, default_value = "1")]
pub max_depth: Option<usize>,
- /// Recurse into hidden directories.
- ///
- /// Traverse into hidden directories while searching. A directory is considered hidden
- /// if its name starts with a `.` sign (dot). If `--max-depth` is 0, this has no effect.
- #[arg(long)]
- pub hidden: bool,
+ #[command(flatten)]
+ pub parsers: Parsers,
+}
+
+#[derive(Debug, Default, Clone, Args)]
+pub struct Parsers {
+ /// Match all child directories.
+ #[arg(short, long)]
+ pub all: bool,
/// Match directories containing <PATTERN>.
///