atuin/src/main.rs

38 lines
727 B
Rust
Raw Normal View History

2021-02-14 08:15:26 -07:00
#![warn(clippy::pedantic, clippy::nursery)]
2021-03-10 14:24:08 -07:00
#![allow(clippy::use_self)] // not 100% reliable
2021-02-14 06:28:01 -07:00
use eyre::Result;
use structopt::{clap::AppSettings, StructOpt};
#[macro_use]
extern crate log;
2021-02-14 10:18:02 -07:00
use command::AtuinCmd;
2021-02-13 12:37:00 -07:00
mod command;
#[derive(StructOpt)]
#[structopt(
author = "Ellie Huxtable <e@elm.sh>",
version = "0.5.0",
about = "Magical shell history",
global_settings(&[AppSettings::ColoredHelp, AppSettings::DeriveDisplayOrder])
)]
2021-02-13 05:58:40 -07:00
struct Atuin {
#[structopt(subcommand)]
2021-02-13 05:58:40 -07:00
atuin: AtuinCmd,
}
2021-02-13 05:58:40 -07:00
impl Atuin {
async fn run(self) -> Result<()> {
self.atuin.run().await
}
}
#[tokio::main]
async fn main() -> Result<()> {
pretty_env_logger::init();
Atuin::from_args().run().await
}