This repository has been archived on 2023-01-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
toolkit/src/init/mod.rs
2022-12-18 20:05:49 +01:00

21 lines
486 B
Rust

mod fish;
pub struct Init;
impl util::Cmd for Init {
fn cmd() -> eyre::Result<clap::Command> {
let cmd = clap::Command::new("init")
.subcommands(&[fish::Fish::cmd()?])
.subcommand_required(true);
Ok(cmd)
}
fn exec(args: &clap::ArgMatches) -> eyre::Result<()> {
match args.subcommand() {
Some(("fish", args)) => fish::Fish::exec(args),
_ => Err(eyre::anyhow!("missing command!")),
}
}
}