atuin/src/main.rs
Ellie Huxtable 4a50ce3666 Bugfixes, show time ago, perf improvements
Also allow unique listing and more ergonomic cwd usage
2021-04-21 21:26:44 +01:00

37 lines
727 B
Rust

#![warn(clippy::pedantic, clippy::nursery)]
#![allow(clippy::use_self)] // not 100% reliable
use eyre::Result;
use structopt::{clap::AppSettings, StructOpt};
#[macro_use]
extern crate log;
use command::AtuinCmd;
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])
)]
struct Atuin {
#[structopt(subcommand)]
atuin: AtuinCmd,
}
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
}