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/command/stats.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/command/stats.rs') diff --git a/src/command/stats.rs b/src/command/stats.rs index 742202ae..d7bddc82 100644 --- a/src/command/stats.rs +++ b/src/command/stats.rs @@ -4,26 +4,21 @@ use chrono::prelude::*; use chrono::Duration; use chrono_english::parse_date_string; +use clap::Parser; use cli_table::{format::Justify, print_stdout, Cell, Style, Table}; use eyre::{eyre, Result}; -use structopt::StructOpt; use atuin_client::database::Database; use atuin_client::history::History; use atuin_client::settings::Settings; -#[derive(StructOpt)] +#[derive(Parser)] +#[clap(infer_subcommands = true)] pub enum Cmd { - #[structopt( - about="compute statistics for all of time", - aliases=&["d", "da"], - )] + /// Compute statistics for all of time All, - #[structopt( - about="compute statistics for a single day", - aliases=&["d", "da"], - )] + /// Compute statistics for a single day Day { words: Vec }, } -- cgit v1.3.1