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) <noreply@anthropic.com>
This commit is contained in:
Emma Thorpe
2026-06-09 20:03:59 +01:00
parent 4858de0a07
commit cee083fbfa
+15 -1
View File
@@ -6,7 +6,21 @@
enableCompletion = true; enableCompletion = true;
enableVteIntegration = true; enableVteIntegration = true;
autosuggestion.enable = 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; history.append = true;
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;