add releaser

This commit is contained in:
2022-12-18 20:05:49 +01:00
parent bd52a2d3bb
commit 98cb397ea9
8 changed files with 174 additions and 4 deletions

20
src/init/mod.rs Normal file
View File

@@ -0,0 +1,20 @@
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!")),
}
}
}