Skip to content

Commit 4cd210b

Browse files
committed
Fix async suggestions when SH_WORD_SPLIT is set
1 parent 586b513 commit 4cd210b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/async.zsh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ _zsh_autosuggest_async_request() {
5454
# First arg will be fd ready for reading
5555
# Second arg will be passed in case of error
5656
_zsh_autosuggest_async_response() {
57+
emulate -L zsh
58+
5759
if [[ -z "$2" || "$2" == "hup" ]]; then
5860
# Read everything from the fd and give it as a suggestion
5961
zle autosuggest-suggest -- "$(cat <&$1)"

zsh-autosuggestions.zsh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,8 @@ _zsh_autosuggest_async_request() {
653653
# First arg will be fd ready for reading
654654
# Second arg will be passed in case of error
655655
_zsh_autosuggest_async_response() {
656+
emulate -L zsh
657+
656658
if [[ -z "$2" || "$2" == "hup" ]]; then
657659
# Read everything from the fd and give it as a suggestion
658660
zle autosuggest-suggest -- "$(cat <&$1)"

0 commit comments

Comments
 (0)