blob: 3a3ed393de067f1ed03aad9b735f5ada85959632 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
use clap::Subcommand;
use eyre::Result;
mod client;
mod server;
#[derive(Subcommand)]
#[clap(infer_subcommands = true)]
pub enum AtuinCmd {
#[clap(flatten)]
Client(client::Cmd),
/// Start an atuin server
#[clap(subcommand)]
Server(server::Cmd),
}
impl AtuinCmd {
pub async fn run(self) -> Result<()> {
match self {
Self::Client(client) => client.run().await,
Self::Server(server) => server.run().await,
}
}
}
|