From f8d01eef998c86c52514896539c13dbfe1837e55 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 15 Feb 2024 10:52:19 -0800 Subject: feat: add 'ignored_commands' option to stats (#1722) --- atuin-client/src/settings.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'atuin-client/src') diff --git a/atuin-client/src/settings.rs b/atuin-client/src/settings.rs index f4c47c64..763fde1b 100644 --- a/atuin-client/src/settings.rs +++ b/atuin-client/src/settings.rs @@ -270,6 +270,8 @@ pub struct Stats { pub common_prefix: Vec, // sudo, etc. commands we want to strip off #[serde(default = "Stats::common_subcommands_default")] pub common_subcommands: Vec, // kubectl, commands we should consider subcommands for + #[serde(default = "Stats::ignored_commands_default")] + pub ignored_commands: Vec, // cd, ls, etc. commands we want to completely hide from stats } impl Stats { @@ -283,6 +285,10 @@ impl Stats { .map(String::from) .collect() } + + fn ignored_commands_default() -> Vec { + vec![] + } } impl Default for Stats { @@ -290,6 +296,7 @@ impl Default for Stats { Self { common_prefix: Self::common_prefix_default(), common_subcommands: Self::common_subcommands_default(), + ignored_commands: Self::ignored_commands_default(), } } } -- cgit v1.3.1