From 14bef9c4a4047e57851c1dad76ae85c121171d49 Mon Sep 17 00:00:00 2001
From: Evan McBeth <64177332+AtomicRobotMan0101@users.noreply.github.com>
Date: Tue, 10 Oct 2023 00:37:14 +1100
Subject: [PATCH] Update key-binding.md (#1291)
added some info about FISH and how to bind the CTRL-up keyset.
---
docs/docs/key-binding.md | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/docs/docs/key-binding.md b/docs/docs/key-binding.md
index 94e3ee7..1cb6c8d 100644
--- a/docs/docs/key-binding.md
+++ b/docs/docs/key-binding.md
@@ -83,6 +83,7 @@ bind -x '"\C-r": __atuin_history'
```
## fish
+Edit key bindings in FISH shell by adding the following to ~/.config/fish/config.fish
```
set -gx ATUIN_NOBIND "true"
@@ -93,6 +94,15 @@ bind \cr _atuin_search
bind -M insert \cr _atuin_search
```
+Adding the useful alternative key binding of CTRL-up is tricky and determined by the terminals adherence to terminfo(5).
+
+Conveniently FISH uses a command to capture keystrokes and advises you of the exact command to add for your specific terminal.
+In your terminal, run `fish_key_reader` then punch the desired keystroke/s.
+
+For example, in Gnome Terminal the output to CTRL-upkey is `bind \e\[1\;5A 'do something'`
+
+So, adding this to the above sample, `bind \e\[1\;5A _atuin_search` will provide the additional search keybinding.
+
## nu
```