diff options
| author | ZhiHong Li <joker_lizhih@163.com> | 2022-05-01 16:25:12 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-01 09:25:12 +0100 |
| commit | e05c19d0ff37a900847a6073de0ca05498ebe6d1 (patch) | |
| tree | a10d866f71fc66046e4638c149efce3b08f77088 /docs/zh-CN/key-binding.md | |
| parent | Add Russian documentation translation (#365) (diff) | |
| download | atuin-e05c19d0ff37a900847a6073de0ca05498ebe6d1.zip | |
Add Chinese documentation translation & Fix spelling mistakes (#373)
* Add Chinese documentation translation
* Fix spelling mistakes
Diffstat (limited to 'docs/zh-CN/key-binding.md')
| -rw-r--r-- | docs/zh-CN/key-binding.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/zh-CN/key-binding.md b/docs/zh-CN/key-binding.md new file mode 100644 index 00000000..ea93032b --- /dev/null +++ b/docs/zh-CN/key-binding.md @@ -0,0 +1,37 @@ +# 键绑定 + +默认情况下, 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_widget" + +``` +export ATUIN_NOBIND="true" +eval "$(atuin init zsh)" + +bindkey '^r' _atuin_search_widget + +# 取决于终端模式 +bindkey '^[[A' _atuin_search_widget +bindkey '^[OA' _atuin_search_widget +``` + +# bash + +``` +export ATUIN_NOBIND="true" +eval "$(atuin init bash)" + +# 绑定到 ctrl-r, 也可以在这里添加任何其他你想要的绑定方式 +bind -x '"\C-r": __atuin_history' +``` |
