From 69bf058c231ec94006c0c31c96343ce6a60d4ac9 Mon Sep 17 00:00:00 2001 From: JeeBak Kim Date: Sat, 28 Aug 2021 21:13:32 -0700 Subject: [PATCH 1/2] Ensure we're using the builtin exec --- src/async.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/async.zsh b/src/async.zsh index 218eb26..a4fb047 100644 --- a/src/async.zsh +++ b/src/async.zsh @@ -11,7 +11,7 @@ _zsh_autosuggest_async_request() { # If we've got a pending request, cancel it if [[ -n "$_ZSH_AUTOSUGGEST_ASYNC_FD" ]] && { true <&$_ZSH_AUTOSUGGEST_ASYNC_FD } 2>/dev/null; then # Close the file descriptor and remove the handler - exec {_ZSH_AUTOSUGGEST_ASYNC_FD}<&- + builtin exec {_ZSH_AUTOSUGGEST_ASYNC_FD}<&- zle -F $_ZSH_AUTOSUGGEST_ASYNC_FD # We won't know the pid unless the user has zsh/system module installed @@ -32,7 +32,7 @@ _zsh_autosuggest_async_request() { fi # Fork a process to fetch a suggestion and open a pipe to read from it - exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <( + builtin exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <( # Tell parent process our pid echo $sysparams[pid] @@ -68,7 +68,7 @@ _zsh_autosuggest_async_response() { zle autosuggest-suggest -- "$suggestion" # Close the fd - exec {1}<&- + builtin exec {1}<&- fi # Always remove the handler From 8072e52d969409f3a9d5b6e977443e69bc6fe568 Mon Sep 17 00:00:00 2001 From: JeeBak Kim Date: Sat, 28 Aug 2021 21:14:03 -0700 Subject: [PATCH 2/2] Run: make --- zsh-autosuggestions.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index b19cac7..1b95a62 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -766,7 +766,7 @@ _zsh_autosuggest_async_request() { # If we've got a pending request, cancel it if [[ -n "$_ZSH_AUTOSUGGEST_ASYNC_FD" ]] && { true <&$_ZSH_AUTOSUGGEST_ASYNC_FD } 2>/dev/null; then # Close the file descriptor and remove the handler - exec {_ZSH_AUTOSUGGEST_ASYNC_FD}<&- + builtin exec {_ZSH_AUTOSUGGEST_ASYNC_FD}<&- zle -F $_ZSH_AUTOSUGGEST_ASYNC_FD # We won't know the pid unless the user has zsh/system module installed @@ -787,7 +787,7 @@ _zsh_autosuggest_async_request() { fi # Fork a process to fetch a suggestion and open a pipe to read from it - exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <( + builtin exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <( # Tell parent process our pid echo $sysparams[pid] @@ -823,7 +823,7 @@ _zsh_autosuggest_async_response() { zle autosuggest-suggest -- "$suggestion" # Close the fd - exec {1}<&- + builtin exec {1}<&- fi # Always remove the handler