summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorEllie Huxtable <e@elm.sh>2021-05-08 14:17:22 +0100
committerGitHub <noreply@github.com>2021-05-08 14:17:22 +0100
commit8bd4d12cfa008f761afb12a8e966f4fb95a47753 (patch)
tree92eafc0f72574c506fad9896d6b5a49164736cb9 /docs
parent035bf9a99b64d415595f925009767775fb17fbc7 (diff)
Add ATUIN_NOBIND (#62)
* Add ATUIN_NOBIND * Update docs/key-binding.md `<kbd>`, what magic Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com> Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/key-binding.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/key-binding.md b/docs/key-binding.md
new file mode 100644
index 00000000..c8776741
--- /dev/null
+++ b/docs/key-binding.md
@@ -0,0 +1,38 @@
+# 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'
+```