diff options
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -1,11 +1,11 @@ -use crate::{paths::PathEntry, Config}; +use crate::{Config, SearchPath}; use clap::{Args, Parser}; use figment::{value, Metadata, Profile, Provider}; use serde::Serialize; use std::path::PathBuf; use tracing::Level; -/// Tool for managing tmux sessions +/// Tool for listing project directories. #[derive(Debug, Clone, Default, Parser, Serialize)] #[command(author, version, about)] #[serde(into = "Config")] @@ -34,7 +34,7 @@ pub struct Cli { impl Provider for Cli { fn metadata(&self) -> Metadata { - Metadata::named("Tmuxr cli provider") + Metadata::named("Projectr cli provider") } fn data(&self) -> figment::error::Result<value::Map<Profile, value::Dict>> { @@ -48,21 +48,14 @@ impl From<Cli> for Config { .paths .iter() .cloned() - .map(|p| PathEntry { + .map(|p| SearchPath { path: p, hidden: value.hidden, recurse: value.max_depth, }) .collect(); - Config { - paths: crate::paths::Config { paths }, - logging: crate::logging::Config { - stdout: value.verbose.into(), - ..Default::default() - }, - ..Default::default() - } + Config { paths } } } |