atuin/docs/ru/key-binding_ru.md
Koichi Murase 2ef5169357
feat(zsh): update widget names (#1631)
The current widget names for Zsh start with "_", which gives an
impression to users that those widgets are internal API and should not
be bound by the users.  However, we actually instruct users to set up
custom keybindings by specifying them to bindkey.

In other shells, a separate namespace for widgets are not prepared, so
we want to prefix "_" to shell function names to tell the users that
these are not the commands that are supposed to be called from the
command line.  However, the widget names are separated in their own
namespace in Zsh, so we do not have to isolate them by prefixing "_".
In fact, other frameworks such as `fzf` define widgets with names not
starting with "_".

In this patch, we update the widget names to have the form "atuin-*".
The old widget names that existed in the release version <= 17.2.1 are
left for compatibility.
2024-01-29 10:35:34 +00:00

1.1 KiB

Key binding

По умолчанию, Autin будет переназначать Ctrl-r и клавишу 'стрелка вверх'. Если вы не хотите этого, установите параметр ATUIN_NOBIND прежде чем вызывать atuin init

Например,

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

Таким образом вы можете разрешить переназначение клавиш Autin, если это необходимо. Делайте это до инициализирующего вызова.

zsh

Autin устанавливает виджет ZLE "atuin-search"

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

bindkey '^r' atuin-search

# зависит от режима терминала
bindkey '^[[A' atuin-search
bindkey '^[OA' atuin-search

bash

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

# Переопределите  ctrl-r, и любые другие сочетания горячих клавиш тут
bind -x '"\C-r": __atuin_history'