I’ve been using Atuin recently to manage shell history. I really like it though it does take a bit of getting used to when it takes over the up
arrow key in a terminal by default.
Fortunately you can switch the default to make the up
arrow filter commands to ones run in the current directory, removing a good number of results that are probably not relevant. You can still search your global history with ctrl+r
.
The trick is to update the Atuin config file, which by default is stored in ~/.config/atuin/config.toml
. There’s a specific setting there, called filter_mode_shell_up_key_binding
. You set it like so:
# only return commands run in this directory
filter_mode_shell_up_key_binding = "directory"
# only return commands run on this computer
filter_mode_shell_up_key_binding = "host"
# do not filter results - show everything
filter_mode_shell_up_key_binding = "global"
You can also turn it off completely. More in the docs.