From 2b730c9634be0e8ca92815a3a9d866c1c1c2e0c5 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Fri, 25 Aug 2023 15:55:25 -0600 Subject: [PATCH] cleanup: More precisely check number of args instead of second arg value --- src/async.zsh | 2 +- zsh-autosuggestions.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/async.zsh b/src/async.zsh index 261cba7..faf24dc 100644 --- a/src/async.zsh +++ b/src/async.zsh @@ -62,7 +62,7 @@ _zsh_autosuggest_async_response() { local suggestion - if [[ -z "$2" || "$2" == "hup" ]]; then + if [[ $# == 1 || "$2" == "hup" ]]; then # Read everything from the fd and give it as a suggestion IFS='' read -rd '' -u $1 suggestion zle autosuggest-suggest -- "$suggestion" diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index dfad3a3..a0451d3 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -817,7 +817,7 @@ _zsh_autosuggest_async_response() { local suggestion - if [[ -z "$2" || "$2" == "hup" ]]; then + if [[ $# == 1 || "$2" == "hup" ]]; then # Read everything from the fd and give it as a suggestion IFS='' read -rd '' -u $1 suggestion zle autosuggest-suggest -- "$suggestion"