use std::path::PathBuf;
use anyhow::Result;
use structopt::StructOpt;
use crate::config::ConfigOpts;
#[derive(Clone, Debug, StructOpt)]
#[structopt(name = "config")]
pub struct Config {
#[structopt(subcommand)]
action: ConfigSubcommands,
}
impl Config {
#[tracing::instrument(level = "trace", skip(self, config))]
pub async fn run(self, config: Option<PathBuf>) -> Result<()> {
match self.action {
ConfigSubcommands::Show => {
let cfg = ConfigOpts::full(config)?;
println!("{:#?}", cfg);
}
}
Ok(())
}
}
#[derive(Clone, Debug, StructOpt)]
enum ConfigSubcommands {
Show,
}