diff options
| author | David <drmorr@appliedcomputing.io> | 2024-02-15 10:52:19 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-15 18:52:19 +0000 |
| commit | f8d01eef998c86c52514896539c13dbfe1837e55 (patch) | |
| tree | 052501235a415a3400b3db1a6d5e05f3f4c8bef4 /atuin-client/src/settings.rs | |
| parent | feat(search): process Ctrl+m for kitty keyboard protocol (#1720) (diff) | |
| download | atuin-f8d01eef998c86c52514896539c13dbfe1837e55.zip | |
feat: add 'ignored_commands' option to stats (#1722)
Diffstat (limited to 'atuin-client/src/settings.rs')
| -rw-r--r-- | atuin-client/src/settings.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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<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(), } } } |
