aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/client/stats.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/client/stats.rs')
-rw-r--r--src/command/client/stats.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/command/client/stats.rs b/src/command/client/stats.rs
index 6d342c19..85c58cc0 100644
--- a/src/command/client/stats.rs
+++ b/src/command/client/stats.rs
@@ -8,9 +8,9 @@ use clap::Parser;
use cli_table::{format::Justify, print_stdout, Cell, Style, Table};
use eyre::{bail, Result};
-use atuin_client::database::Database;
+use atuin_client::database::{current_context, Database};
use atuin_client::history::History;
-use atuin_client::settings::Settings;
+use atuin_client::settings::{FilterMode, Settings};
#[derive(Parser)]
#[clap(infer_subcommands = true)]
@@ -71,6 +71,8 @@ impl Cmd {
db: &mut (impl Database + Send + Sync),
settings: &Settings,
) -> Result<()> {
+ let context = current_context();
+
match self {
Self::Day { words } => {
let words = if words.is_empty() {
@@ -90,7 +92,7 @@ impl Cmd {
}
Self::All => {
- let history = db.list(None, false).await?;
+ let history = db.list(FilterMode::Global, &context, None, false).await?;
compute_stats(&history)?;