diff --git a/src/async.zsh b/src/async.zsh index d08d944..a300a85 100644 --- a/src/async.zsh +++ b/src/async.zsh @@ -22,8 +22,8 @@ _zsh_autosuggest_async_request() { # Fork a process to fetch a suggestion and open a pipe to read from it exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <( - # Tell parent process our pid - echo $sysparams[pid] + # Tell parent process our pid if we can + echo ${sysparams[pid]:-} # Fetch and print the suggestion local suggestion diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index bd5aa3c..5520857 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -777,8 +777,8 @@ _zsh_autosuggest_async_request() { # Fork a process to fetch a suggestion and open a pipe to read from it exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <( - # Tell parent process our pid - echo $sysparams[pid] + # Tell parent process our pid if we can + echo ${sysparams[pid]:-} # Fetch and print the suggestion local suggestion