cleanup: More precisely check number of args instead of second arg value

This commit is contained in:
Eric Freese 2023-08-25 15:55:25 -06:00
parent 35ed23efe8
commit 2b730c9634
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@ _zsh_autosuggest_async_response() {
local suggestion local suggestion
if [[ -z "$2" || "$2" == "hup" ]]; then if [[ $# == 1 || "$2" == "hup" ]]; then
# Read everything from the fd and give it as a suggestion # Read everything from the fd and give it as a suggestion
IFS='' read -rd '' -u $1 suggestion IFS='' read -rd '' -u $1 suggestion
zle autosuggest-suggest -- "$suggestion" zle autosuggest-suggest -- "$suggestion"

View file

@ -817,7 +817,7 @@ _zsh_autosuggest_async_response() {
local suggestion local suggestion
if [[ -z "$2" || "$2" == "hup" ]]; then if [[ $# == 1 || "$2" == "hup" ]]; then
# Read everything from the fd and give it as a suggestion # Read everything from the fd and give it as a suggestion
IFS='' read -rd '' -u $1 suggestion IFS='' read -rd '' -u $1 suggestion
zle autosuggest-suggest -- "$suggestion" zle autosuggest-suggest -- "$suggestion"