aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/stats.rs
diff options
context:
space:
mode:
authorJamie Quigley <jamie@quigley.xyz>2022-04-07 06:32:11 +0100
committerGitHub <noreply@github.com>2022-04-07 06:32:11 +0100
commitf861893293629f4f8c315b8042295df049973e29 (patch)
tree995af6417a0e02a05478703023f9c9438f9ac500 /src/command/stats.rs
parentAdd compact mode (#288) (diff)
downloadatuin-f861893293629f4f8c315b8042295df049973e29.zip
Update to clap 3.1.x (#289)
Diffstat (limited to 'src/command/stats.rs')
-rw-r--r--src/command/stats.rs15
1 files changed, 5 insertions, 10 deletions
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<String> },
}