summaryrefslogtreecommitdiffstats
path: root/atuin-client
diff options
context:
space:
mode:
Diffstat (limited to 'atuin-client')
-rw-r--r--atuin-client/config.toml3
-rw-r--r--atuin-client/src/settings.rs7
2 files changed, 10 insertions, 0 deletions
diff --git a/atuin-client/config.toml b/atuin-client/config.toml
index facc0bd4c..19a6d61e1 100644
--- a/atuin-client/config.toml
+++ b/atuin-client/config.toml
@@ -171,3 +171,6 @@ enter_accept = true
## Set commands that should be totally stripped and ignored from stats
#common_prefix = ["sudo"]
+
+## Set commands that will be completely ignored from stats
+#ignored_commands = ["cd", "ls", "vi"]
diff --git a/atuin-client/src/settings.rs b/atuin-client/src/settings.rs
index f4c47c645..763fde1b0 100644
--- a/atuin-client/src/settings.rs
+++ b/atuin-client/src/settings.rs
@@ -270,6 +270,8 @@ pub struct Stats {
pub common_prefix: Vec<String>, // sudo, etc. commands we want to strip off
#[serde(default = "Stats::common_subcommands_default")]
pub common_subcommands: Vec<String>, // kubectl, commands we should consider subcommands for
+ #[serde(default = "Stats::ignored_commands_default")]
+ pub ignored_commands: Vec<String>, // 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<String> {
+ 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(),
}
}
}