use std::path::PathBuf;
use structopt::StructOpt;
use crate::types::Operation;
#[derive(Debug, StructOpt, Clone)]
#[structopt(
name = "monolith",
about = "Advanced Git management suite for multiple repositories",
version = "1.0"
)]
pub struct Args {
#[structopt(subcommand)]
pub operation: Operation,
#[structopt(short, long, parse(from_os_str))]
pub source_dir: PathBuf,
#[structopt(short, long, parse(from_os_str))]
pub target_dir: Option<PathBuf>,
#[structopt(short, long)]
pub verbose: bool,
#[structopt(long)]
pub reverse: bool,
#[structopt(short, long)]
pub filter: Option<String>,
}
impl Args {
pub fn from_args() -> anyhow::Result<Self> {
Ok(Self::from_args_safe()?)
}
}