summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 42f9a59..a5cd2dd 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -38,13 +38,14 @@ pub struct Projects {
#[arg(long)]
hidden: bool,
- /// Match git repositories
- #[arg(long, short, default_value_t = true)]
- git: bool,
-
/// Match directories containing item named <PATTERN>
#[arg(long, short)]
pattern: Option<String>,
+
+ /// Match git repositories
+ #[cfg(feature = "git")]
+ #[arg(long, short, default_value_t = true)]
+ git: bool,
}
impl Provider for Projects {
@@ -67,8 +68,10 @@ impl From<Projects> for Config {
path_buf,
hidden: value.hidden,
max_depth: value.max_depth,
- git: value.git,
pattern: value.pattern.to_owned(),
+
+ #[cfg(feature = "git")]
+ git: value.git,
})
.collect();