aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/mod.rs
diff options
context:
space:
mode:
authorEllie Huxtable <e@elm.sh>2021-02-14 22:12:35 +0000
committerGitHub <noreply@github.com>2021-02-14 22:12:35 +0000
commit851285225fce83bd63410d44e106df0c2a4a4733 (patch)
tree943681c16d49a464dbc1ac80441a37572c271b47 /src/command/mod.rs
parentzsh bin is sometimes /usr/bin/zsh or might be elsewhere too (#8) (diff)
downloadatuin-851285225fce83bd63410d44e106df0c2a4a4733.zip
Add stats command (#9)
* Add stats command For example atuin stats day yesterday atuin stats day last friday atuin stats day 01/01/21 * Output tables, fix import blanks
Diffstat (limited to 'src/command/mod.rs')
-rw-r--r--src/command/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command/mod.rs b/src/command/mod.rs
index 2e8d4778..a5dd039e 100644
--- a/src/command/mod.rs
+++ b/src/command/mod.rs
@@ -7,6 +7,7 @@ use crate::local::database::Sqlite;
mod history;
mod import;
mod server;
+mod stats;
#[derive(StructOpt)]
pub enum AtuinCmd {
@@ -22,6 +23,9 @@ pub enum AtuinCmd {
#[structopt(about = "start an atuin server")]
Server(server::Cmd),
+ #[structopt(about = "calculate statistics for your history")]
+ Stats(stats::Cmd),
+
#[structopt(about = "generates a UUID")]
Uuid,
}
@@ -36,6 +40,7 @@ impl AtuinCmd {
Self::History(history) => history.run(db),
Self::Import(import) => import.run(db),
Self::Server(server) => server.run(),
+ Self::Stats(stats) => stats.run(db),
Self::Uuid => {
println!("{}", uuid_v4());