Skip to main content

Key binding

Shell

By default, Atuin will rebind both Ctrl-r and the up arrow.

You can also disable either the up-arrow or Ctrl-r bindings individually, by passing --disable-up-arrow or --disable-ctrl-r to the call to atuin init:

# Bind ctrl-r but not up arrow
eval "$(atuin init zsh --disable-up-arrow)"

# Bind up-arrow but not ctrl-r
eval "$(atuin init zsh --disable-ctrl-r)"

If you do not want either key to be bound, either pass both --disable arguments, or set the environment varuable ATUIN_NOBIND to any value before the call to atuin init:

## Do not bind any keys
# Either:
eval "$(atuin init zsh --disable-up-arrow --disable-ctrl-r)"

# Or:
export ATUIN_NOBIND="true"
eval "$(atuin init zsh)"

You can then choose to bind Atuin if needed, do this after the call to init.

zsh

Atuin defines the ZLE widget "_atuin_search_widget"

export ATUIN_NOBIND="true"
eval "$(atuin init zsh)"

bindkey '^r' _atuin_search_widget

# depends on terminal mode
bindkey '^[[A' _atuin_search_widget
bindkey '^[OA' _atuin_search_widget

bash

export ATUIN_NOBIND="true"
eval "$(atuin init bash)"

# bind to ctrl-r, add any other bindings you want here too
bind -x '"\C-r": __atuin_history'

fish

set -gx ATUIN_NOBIND "true"
atuin init fish | source

# bind to ctrl-r in normal and insert mode, add any other bindings you want here too
bind \cr _atuin_search
bind -M insert \cr _atuin_search

Atuin UI shortcuts

ShortcutAction
ctrl + rCycle through filter modes
ctrl + sCycle through search modes
alt + 1 to alt + 9Select item by the number located near it
ctrl + c / ctrl + d / ctrl + g / escReturn original
ctrl + ⬅️ / alt + bMove the cursor to the previous word
ctrl + ➡️ / alt + fMove the cursor to the next word
ctrl + h / ctrl + b / ⬅️Move the cursor to the left
ctrl + l / ctrl + f / ➡️Move the cursor to the right
ctrl + a / homeMove the cursor to the start of the line
ctrl + e / endMove the cursor to the end of the line
ctrl + backspace / ctrl + alt + backspaceRemove the previous word / remove the word just before the cursor
ctrl + delete / ctrl + alt + deleteRemove the next word or the word just after the cursor
ctrl + wRemove the word before the cursor even if it spans across the word boundaries
ctrl + uClear the current line
ctrl + n / ctrl + j ➡️Select the next item on the list
ctrl + p / ctrl + k / ⬆️Select the previous item on the list
page downScroll search results one page down
page upScroll search results one page up
enterSelect highlighted item
⬇️ (with no entry selected)Return original or return query depending on settings
⬇️Select the next item on the list