Avoid accessing unset param when zsh/system is not available

This commit is contained in:
Eric Freese 2023-08-25 16:24:02 -06:00
parent 84c7cfaa89
commit 61257de667
2 changed files with 4 additions and 4 deletions

View file

@ -22,8 +22,8 @@ _zsh_autosuggest_async_request() {
# Fork a process to fetch a suggestion and open a pipe to read from it # Fork a process to fetch a suggestion and open a pipe to read from it
exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <( exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <(
# Tell parent process our pid # Tell parent process our pid if we can
echo $sysparams[pid] echo ${sysparams[pid]:-}
# Fetch and print the suggestion # Fetch and print the suggestion
local suggestion local suggestion

View file

@ -777,8 +777,8 @@ _zsh_autosuggest_async_request() {
# Fork a process to fetch a suggestion and open a pipe to read from it # Fork a process to fetch a suggestion and open a pipe to read from it
exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <( exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <(
# Tell parent process our pid # Tell parent process our pid if we can
echo $sysparams[pid] echo ${sysparams[pid]:-}
# Fetch and print the suggestion # Fetch and print the suggestion
local suggestion local suggestion