Skip to content

Commit

Permalink
adding atuin history filter
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly committed Oct 20, 2024
1 parent a8aa55c commit 670eae5
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions .config/atuin/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

## where to store your database, default is your system data directory
## linux/mac: ~/.local/share/atuin/history.db
## windows: %USERPROFILE%/.local/share/atuin/history.db
Expand Down Expand Up @@ -93,15 +94,23 @@ update_check = true
## default history list format - can also be specified with the --format arg
history_format = "{command}"

## prevent commands matching any of these regexes from being written to history.
## Note that these regular expressions are unanchored, i.e. if they don't start
## with ^ or end with $, they'll match anywhere in the command.
## For details on the supported regular expression syntax, see
## https://docs.rs/regex/latest/regex/#syntax
# history_filter = [
# "^secret-cmd",
# "^innocuous-cmd .*--secret=.+",
# ]
history_filter = [
"^ls ",
"^pwd$",
"^exit$",
"^cd ",
"^gc ",
"^.* --help$",
"^history$",
"^j ",
"^jj ",
"^glo$",
"^gfu$",
"^g st$",
"^g ss$",
"^sudo hostile.*$",
"throttle-internet",
]

## prevent commands run with cwd matching any of these regexes from being written
## to history. Note that these regular expressions are unanchored, i.e. if they don't
Expand Down Expand Up @@ -213,7 +222,7 @@ records = true

[daemon]
## Enables using the daemon to sync. Requires the daemon to be running in the background. Start it with `atuin daemon`
# enabled = false
# enabled = true

## How often the daemon should sync in seconds
# sync_frequency = 300
Expand All @@ -230,3 +239,11 @@ records = true

## The port that should be used for TCP on non unix systems
# tcp_port = 8889

[dotfiles]
## prevent commands matching any of these regexes from being written to history.
## Note that these regular expressions are unanchored, i.e. if they don't start
## with ^ or end with $, they'll match anywhere in the command.
## For details on the supported regular expression syntax, see
## https://docs.rs/regex/latest/regex/#syntax
enabled = false

0 comments on commit 670eae5

Please sign in to comment.