mirror of
https://github.com/atuinsh/atuin.git
synced 2024-12-29 10:29:55 +01:00
cd2a3ab7d5
Add the missing fish shell part into the documentation for ATUIN_NOBIND. Binding to up is pretty problematic in fish, as if you want to navigate the pager for auto-suggestions, you tend to get a bit stuck.
49 lines
954 B
Markdown
49 lines
954 B
Markdown
# Key binding
|
|
|
|
By default, Atuin will rebind both <kbd>Ctrl-r</kbd> and the up arrow. If you do not want
|
|
this to happen, set ATUIN_NOBIND before the call to `atuin init`
|
|
|
|
For example
|
|
|
|
```
|
|
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
|
|
```
|