atuin: Set up configuration

This commit is contained in:
Marty Oehme 2025-03-14 23:58:33 +01:00
parent 22af0cf46e
commit 71c5ac3f19
Signed by: Marty
GPG key ID: 4E535BC19C61886E
3 changed files with 78 additions and 83 deletions

View file

@ -0,0 +1,75 @@
## which search mode to use
## possible values: prefix, fulltext, fuzzy, skim
# search_mode = "fuzzy"
## which filter mode to use
## possible values: global, host, session, directory
# filter_mode = "global"
# Enable 'workspace' filtering if we are in a git dir
workspaces = true
# don't always update timestamps etc
prefers_reduced_motion = true
# don't waste a line
show_tabs = false
# enter vi normal/insert mode automatically
keymap_mode = "auto"
## which filter mode to use when atuin is invoked from a shell up-key binding
## the accepted values are identical to those of "filter_mode"
## leave unspecified to use same mode set in "filter_mode"
filter_mode_shell_up_key_binding = "session"
## which search mode to use when atuin is invoked from a shell up-key binding
## the accepted values are identical to those of "search_mode"
## leave unspecified to use same mode set in "search_mode"
# search_mode_shell_up_key_binding = "fuzzy"
## which style to use
## possible values: auto, full, compact
style = "compact"
## 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 = [
"^pass"
# "^secret-cmd",
# "^innocuous-cmd .*--secret=.+"
]
## 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
## start with ^ or end with $, they'll match anywhere in CWD.
## For details on the supported regular expression syntax, see
## https://docs.rs/regex/latest/regex/#syntax
# cwd_filter = [
# "^/very/secret/area"
# ]
## Configure whether or not to show the help row, which includes the current Atuin
## version (and whether an update is available), a keymap hint, and the total
## amount of commands in your history.
# show_help = true
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",
#]
#
# Set commands that should be totally stripped and ignored from stats
#common_prefix = ["sudo"]

View file

@ -25,7 +25,6 @@ if command -v zr >/dev/null 2>&1; then
molovo/tipz \
ael-code/zsh-colored-man-pages \
MichaelAquilina/zsh-auto-notify \
junegunn/fzf.git/shell/key-bindings.zsh \
Aloxaf/fzf-tab \
zdharma-continuum/fast-syntax-highlighting \
zsh-users/zsh-autosuggestions \
@ -35,7 +34,6 @@ if command -v zr >/dev/null 2>&1; then
else # or manually
[ -e /usr/share/oh-my-zsh/plugins/colored-man-pages/colored-man-pages.plugin.zsh ] && source /usr/share/oh-my-zsh/plugins/colored-man-pages/colored-man-pages.plugin.zsh
[ -e /usr/share/oh-my-zsh/plugins/command-not-found/command-not-found.plugin.zsh ] && source /usr/share/oh-my-zsh/plugins/command-not-found/command-not-found.plugin.zsh
[ -e /usr/share/fzf/key-bindings.zsh ] && source /usr/share/fzf/key-bindings.zsh
## find the correct installed tab-completion version
PLUG_FOLDER="/usr/share/zsh/plugins"
[ -e $PLUG_FOLDER/fzf-tab/fzf-tab.plugin.zsh ] && source $PLUG_FOLDER/fzf-tab/fzf-tab.plugin.zsh
@ -223,6 +221,9 @@ bindkey '^N' history-beginning-search-forward
# search history backwards <c-r>
bindkey '^o' history-incremental-search-backward
bindkey -M vicmd '^o' history-incremental-search-backward
bindkey '^r' atuin-search-viins
bindkey -M vicmd '^r' atuin-search-vicmd
# cycle through history results
bindkey -M isearch '^P' history-incremental-search-backward
bindkey -M isearch '^N' history-incremental-search-forward