diff options
| author | Michelle Tilley <michelle@michelletilley.net> | 2025-12-12 14:47:24 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-12 14:47:24 -0800 |
| commit | 2ba93a8c18ca008efb0b03e3cfa826e081a00514 (patch) | |
| tree | b408f74c07d6270cb1618fcff932e94eebdef28d /docs-i18n/zh-CN/key-binding.md | |
| parent | fix: prevent interactive search crash when update check fails (#3016) (diff) | |
| download | atuin-2ba93a8c18ca008efb0b03e3cfa826e081a00514.zip | |
docs: Migrate docs from separate repo to `docs` subfolder (#3018)
Diffstat (limited to 'docs-i18n/zh-CN/key-binding.md')
| -rw-r--r-- | docs-i18n/zh-CN/key-binding.md | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/docs-i18n/zh-CN/key-binding.md b/docs-i18n/zh-CN/key-binding.md new file mode 100644 index 00000000..54c68b37 --- /dev/null +++ b/docs-i18n/zh-CN/key-binding.md @@ -0,0 +1,48 @@ +# 键位绑定 + +默认情况下, Atuin 将会重新绑定 <kbd>Ctrl-r</kbd> 和 `up` 键。如果你不想使用默认绑定,请在调用 `atuin init` 之前设置 ATUIN_NOBIND + +例如: + +``` +export ATUIN_NOBIND="true" +eval "$(atuin init zsh)" +``` + +如果需要,你可以在调用 `atuin init` 之后对 Atuin 重新进行键绑定 + +# zsh + +Atuin 定义了 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' +``` + +# fish + +``` +set -gx ATUIN_NOBIND "true" +atuin init fish | source + +# 在 normal 和 insert 模式下绑定到 ctrl-r,你也可以在此处添加其他键位绑定 +bind \cr _atuin_search +bind -M insert \cr _atuin_search +``` |
