diff options
| author | Jamie Quigley <jamie@quigley.xyz> | 2022-12-24 17:18:44 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-24 17:18:44 +0000 |
| commit | a5616aea8fa28db6f8f7b1a44e28f90aab3363b7 (patch) | |
| tree | e4669336601c6f7a6f14dc980493800f98dd0014 /docs | |
| parent | Allow overriding filter and search modes from CLI (#635) (diff) | |
| download | atuin-a5616aea8fa28db6f8f7b1a44e28f90aab3363b7.zip | |
Rework `atuin init` (#652)
* Rework `atuin init`
This allows users to disable the CTRL-R and Up Arrow bindings,
independently from one another
* Document --disable-{ctrl-r,up-arrow}
* Apply suggestions from code review
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
Diffstat (limited to '')
| -rw-r--r-- | docs/key-binding.md | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/docs/key-binding.md b/docs/key-binding.md index 7a968030..013c28bc 100644 --- a/docs/key-binding.md +++ b/docs/key-binding.md @@ -1,11 +1,27 @@ # 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` +By default, Atuin will rebind both <kbd>Ctrl-r</kbd> and the up arrow. -For example +You can also disable either the up-arrow or <kbd>Ctrl-r</kbd> 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)" ``` @@ -36,6 +52,7 @@ eval "$(atuin init bash)" # bind to ctrl-r, add any other bindings you want here too bind -x '"\C-r": __atuin_history' ``` + # fish ``` |
