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"