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
This commit is contained in:
Patrick Jackson 2023-10-31 01:50:11 -06:00 committed by GitHub
parent a1799af567
commit e83bc6d632
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,12 @@ _atuin_search() {
}
_atuin_up_search() {
# 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