From cee083fbfa479f5610a15fba0b9174bef33bb3db Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Tue, 9 Jun 2026 20:03:59 +0100 Subject: [PATCH] fix(zsh): bind history-substring-search for CSI and SS3 arrows historySubstringSearch bound only the default CSI sequences (^[[A/^[[B), so Up/Down did nothing at the prompt in foot and iTerm2, which send the SS3 application-mode sequences (^[OA/^[OB). Bind both forms via searchUpKey/searchDownKey; this covers foot, iTerm2 and the Linux TTY (CSI). Co-Authored-By: Claude Opus 4.8 (1M context) --- lyrathorpe/home/shell.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lyrathorpe/home/shell.nix b/lyrathorpe/home/shell.nix index 2eb0679..0403dc9 100644 --- a/lyrathorpe/home/shell.nix +++ b/lyrathorpe/home/shell.nix @@ -6,7 +6,21 @@ enableCompletion = true; enableVteIntegration = true; autosuggestion.enable = true; - historySubstringSearch.enable = true; + # Bind Up/Down for history-substring-search in BOTH cursor-key modes: CSI + # (^[[A/^[[B -- normal mode, and what the Linux TTY sends) and SS3 + # (^[OA/^[OB -- application mode, used by foot, tmux and iTerm2). Binding + # only the default CSI form leaves it dead at the prompt in foot/iTerm2. + historySubstringSearch = { + enable = true; + searchUpKey = [ + "^[[A" + "^[OA" + ]; + searchDownKey = [ + "^[[B" + "^[OB" + ]; + }; history.append = true; oh-my-zsh = { enable = true;