From f861893293629f4f8c315b8042295df049973e29 Mon Sep 17 00:00:00 2001 From: Jamie Quigley Date: Thu, 7 Apr 2022 06:32:11 +0100 Subject: Update to clap 3.1.x (#289) --- src/main.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/main.rs') 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 ", 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 } -- cgit v1.3.1