feat(stats): Normalize formatting of default config, suggest nix (#1764)

* Normalize formatting

This makes the commented bits unifed and makes lists multiline and
always adds the trailing comma.

* Add nix to default config

Since we are big fans of it ;)
This commit is contained in:
Sandro 2024-02-26 15:58:22 +01:00 committed by GitHub
parent d9ba2a0061
commit cc964861c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 14 deletions

View File

@ -100,7 +100,7 @@
## https://docs.rs/regex/latest/regex/#syntax
# history_filter = [
# "^secret-cmd",
# "^innocuous-cmd .*--secret=.+"
# "^innocuous-cmd .*--secret=.+",
# ]
## prevent commands run with cwd matching any of these regexes from being written
@ -109,7 +109,7 @@
## For details on the supported regular expression syntax, see
## https://docs.rs/regex/latest/regex/#syntax
# cwd_filter = [
# "^/very/secret/area"
# "^/very/secret/area",
# ]
## Configure the maximum height of the preview to show.
@ -159,21 +159,26 @@ enter_accept = true
[stats]
## Set commands where we should consider the subcommand for statistics. Eg, kubectl get vs just kubectl
#common_subcommands = [
# "cargo",
# "go",
# "git",
# "npm",
# "yarn",
# "pnpm",
# "kubectl",
#]
# common_subcommands = [
# "cargo",
# "git",
# "go",
# "kubectl",
# "npm",
# "nix",
# "pnpm",
# "yarn",
# ]
## Set commands that should be totally stripped and ignored from stats
#common_prefix = ["sudo"]
# common_prefix = ["sudo"]
## Set commands that will be completely ignored from stats
#ignored_commands = ["cd", "ls", "vi"]
# ignored_commands = [
# "cd",
# "ls",
# "vi"
# ]
[keys]
# Defaults to true. If disabled, using the up/down key won't exit the TUI when scrolled past the first/last entry.

View File

@ -281,7 +281,7 @@ impl Stats {
fn common_subcommands_default() -> Vec<String> {
vec![
"cargo", "composer", "git", "go", "kubectl", "npm", "pnpm", "yarn",
"cargo", "composer", "go", "git", "kubectl", "nix", "npm", "pnpm", "yarn",
]
.into_iter()
.map(String::from)