diff options
| author | Jamie Quigley <jamie@quigley.xyz> | 2022-04-07 06:32:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-07 06:32:11 +0100 |
| commit | f861893293629f4f8c315b8042295df049973e29 (patch) | |
| tree | 995af6417a0e02a05478703023f9c9438f9ac500 /src/main.rs | |
| parent | Add compact mode (#288) (diff) | |
| download | atuin-f861893293629f4f8c315b8042295df049973e29.zip | |
Update to clap 3.1.x (#289)
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs index 090c832c..d5a1e823 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,9 @@ #![warn(clippy::pedantic, clippy::nursery)] #![allow(clippy::use_self)] // not 100% reliable +use clap::AppSettings; +use clap::Parser; use eyre::Result; -use structopt::{clap::AppSettings, StructOpt}; #[macro_use] extern crate log; @@ -13,15 +14,15 @@ mod command; const VERSION: &str = env!("CARGO_PKG_VERSION"); -#[derive(StructOpt)] -#[structopt( +/// Magical shell history +#[derive(Parser)] +#[clap( author = "Ellie Huxtable <e@elm.sh>", version = VERSION, - about = "Magical shell history", - global_settings(&[AppSettings::ColoredHelp, AppSettings::DeriveDisplayOrder]) + global_setting(AppSettings::DeriveDisplayOrder), )] struct Atuin { - #[structopt(subcommand)] + #[clap(subcommand)] atuin: AtuinCmd, } @@ -35,5 +36,5 @@ impl Atuin { async fn main() -> Result<()> { pretty_env_logger::init(); - Atuin::from_args().run().await + Atuin::parse().run().await } |
