mod cli;
mod config;
mod content;
mod display;
mod fs_wrappers;
mod hooks;
mod menus;
mod mkdev_error;
mod output_type;
mod recipe;
mod recipe_completer;
mod replacer;
use cli::Cli;
use hooks::hooks;
use recipe::Recipe;
use clap::{CommandFactory, Parser};
use clap_complete::CompleteEnv;
rust_i18n::i18n!("locales", fallback = "en");
fn main() {
CompleteEnv::with_factory(Cli::command).complete();
let args = Cli::parse();
let status = hooks(&args)
.and_then(|_| Recipe::gather())
.and_then(|recipes| args.dispatch(recipes));
if let Err(why) = status {
die!("{why}");
}
}