summaryrefslogtreecommitdiffstats
path: root/crates/atuin/src/command/client/dotfiles.rs
blob: 291c794dd2505673cbabc3f33e22c5a06183cdc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use clap::Subcommand;
use eyre::Result;

use atuin_client::{record::sqlite_store::SqliteStore, settings::Settings};

mod alias;

#[derive(Subcommand, Debug)]
#[command(infer_subcommands = true)]
pub enum Cmd {
    /// Manage shell aliases with Atuin
    #[command(subcommand)]
    Alias(alias::Cmd),
}

impl Cmd {
    pub async fn run(self, settings: &Settings, store: SqliteStore) -> Result<()> {
        match self {
            Self::Alias(cmd) => cmd.run(settings, store).await,
        }
    }
}