From e83bc6d632f208711617572a86d74a89283756ab Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Tue, 31 Oct 2023 01:50:11 -0600 Subject: [PATCH] fix(zsh): Only trigger up-arrow on first line (#1359) * fix(zsh): Only trigger up-arrow on first line * fix(zsh): only trigger up-key if the buffer is 1 line --- atuin/src/shell/atuin.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/atuin/src/shell/atuin.zsh b/atuin/src/shell/atuin.zsh index 44dda4f..afff2d3 100644 --- a/atuin/src/shell/atuin.zsh +++ b/atuin/src/shell/atuin.zsh @@ -50,7 +50,12 @@ _atuin_search() { } _atuin_up_search() { - _atuin_search --shell-up-key-binding + # Only trigger if the buffer is a single line + if [[ ! $BUFFER == *$'\n'* ]]; then + _atuin_search --shell-up-key-binding + else + zle up-line + fi } add-zsh-hook preexec _atuin_preexec