diff --git a/src/async.zsh b/src/async.zsh index e179734..874a160 100644 --- a/src/async.zsh +++ b/src/async.zsh @@ -34,12 +34,12 @@ _zsh_autosuggest_async_request() { # Fork a process to fetch a suggestion and open a pipe to read from it builtin exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <( # Tell parent process our pid - echo $sysparams[pid] + builtin echo $sysparams[pid] # Fetch and print the suggestion local suggestion _zsh_autosuggest_fetch_suggestion "$1" - echo -nE "$suggestion" + builtin echo -nE "$suggestion" ) # There's a weird bug here where ^C stops working unless we force a fork diff --git a/src/strategies/completion.zsh b/src/strategies/completion.zsh index e2d114c..68417ef 100644 --- a/src/strategies/completion.zsh +++ b/src/strategies/completion.zsh @@ -39,7 +39,7 @@ _zsh_autosuggest_capture_completion_widget() { fi # The completion has been added, print the buffer as the suggestion - echo -nE - $'\0'$BUFFER$'\0' + builtin echo -nE - $'\0'$BUFFER$'\0' } zle -N autosuggest-capture-completion _zsh_autosuggest_capture_completion_widget diff --git a/src/util.zsh b/src/util.zsh index 1f55d36..859ed35 100644 --- a/src/util.zsh +++ b/src/util.zsh @@ -7,5 +7,5 @@ _zsh_autosuggest_escape_command() { setopt localoptions EXTENDED_GLOB # Escape special chars in the string (requires EXTENDED_GLOB) - echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}" + builtin echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}" } diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index e780225..24b0212 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -128,7 +128,7 @@ _zsh_autosuggest_escape_command() { setopt localoptions EXTENDED_GLOB # Escape special chars in the string (requires EXTENDED_GLOB) - echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}" + builtin echo -E "${1//(#m)[\"\'\\()\[\]|*?~]/\\$MATCH}" } #--------------------------------------------------------------------# @@ -534,7 +534,7 @@ _zsh_autosuggest_capture_completion_widget() { fi # The completion has been added, print the buffer as the suggestion - echo -nE - $'\0'$BUFFER$'\0' + builtin echo -nE - $'\0'$BUFFER$'\0' } zle -N autosuggest-capture-completion _zsh_autosuggest_capture_completion_widget @@ -791,12 +791,12 @@ _zsh_autosuggest_async_request() { # Fork a process to fetch a suggestion and open a pipe to read from it builtin exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <( # Tell parent process our pid - echo $sysparams[pid] + builtin echo $sysparams[pid] # Fetch and print the suggestion local suggestion _zsh_autosuggest_fetch_suggestion "$1" - echo -nE "$suggestion" + builtin echo -nE "$suggestion" ) # There's a weird bug here where ^C stops working unless we force a fork