diff options
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 32 |
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>. /// |