mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-12-30 00:03:56 +08:00
cleanup: More precisely check number of args instead of second arg value
This commit is contained in:
parent
35ed23efe8
commit
2b730c9634
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user