Add YAML as a config format option

@mustafa89 ;)
This commit is contained in:
2022-01-14 17:27:04 +01:00
parent e45de3b498
commit 9b64de7991
10 changed files with 394 additions and 295 deletions

View File

@@ -61,10 +61,25 @@ pub struct OptionalConfig {
pub config: Option<String>,
}
#[derive(clap::ArgEnum, Clone)]
pub enum ConfigFormat {
Yaml,
Toml,
}
#[derive(Parser)]
pub struct Find {
#[clap(help = "The path to search through")]
pub path: String,
#[clap(
arg_enum,
short,
long,
help = "Format to produce",
default_value_t = ConfigFormat::Toml,
)]
pub format: ConfigFormat,
}
#[derive(Parser)]