aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Jackson <patrick@jackson.dev>2023-10-31 01:50:11 -0600
committerGitHub <noreply@github.com>2023-10-31 07:50:11 +0000
commite83bc6d632f208711617572a86d74a89283756ab (patch)
treeee1b5d9c15f635deec54ad1790d8fb39e328bf8d
parentfix(zsh): bind in the most popular modes (#1360) (diff)
downloadatuin-e83bc6d632f208711617572a86d74a89283756ab.zip
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
-rw-r--r--atuin/src/shell/atuin.zsh7
1 files changed, 6 insertions, 1 deletions
diff --git a/atuin/src/shell/atuin.zsh b/atuin/src/shell/atuin.zsh
index 44dda4fe..afff2d33 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