aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/cli.rs b/src/cli.rs
index b1af9f6..a45f70d 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -1,10 +1,9 @@
use clap::{Args, Parser};
-use figment::{value, Metadata, Profile, Provider};
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
use tracing::{metadata::LevelFilter, Level};
-use crate::{config::Entry, Config};
+use crate::{config::SearchEntryConfig, Config};
/// Tool for listing project directories.
#[derive(Debug, Clone, Default, Parser, Serialize, Deserialize)]
@@ -48,23 +47,13 @@ pub struct Projects {
git: bool,
}
-impl Provider for Projects {
- fn metadata(&self) -> Metadata {
- Metadata::named("Projectr cli provider")
- }
-
- fn data(&self) -> figment::error::Result<value::Map<Profile, value::Dict>> {
- Config::from(self.to_owned()).data()
- }
-}
-
impl From<Projects> for Config {
fn from(value: Projects) -> Self {
let paths = value
.paths
.iter()
.cloned()
- .map(|path_buf| Entry {
+ .map(|path_buf| SearchEntryConfig {
path_buf,
hidden: value.hidden,
max_depth: value.max_depth,