-
Notifications
You must be signed in to change notification settings - Fork 1.9k
A possibly needed workaround for <( ) process substitution #364
Copy link
Copy link
Closed
Labels
Description
Hello,
in branch develop there's currently use of <( ... ) process substitution to do asynchronous calls:
zsh-autosuggestions/zsh-autosuggestions.zsh
Lines 717 to 725 in 681ffc7
| exec {_ZSH_AUTOSUGGEST_ASYNC_FD}< <( | |
| # Tell parent process our pid | |
| echo $sysparams[pid] | |
| # Fetch and print the suggestion | |
| local suggestion | |
| _zsh_autosuggest_fetch_suggestion "$1" | |
| echo -nE "$suggestion" | |
| ) |
I use the same technique in fast-syntax-highlighting, however, I add command sleep 0 (could make it command true) after the exec: https://github.com/zdharma/fast-syntax-highlighting/blob/e06288a617b12e8038fdf5bc4bd40b6a25ef5332/fast-highlight#L917-L918
The reason for this additional call are severe problems with Ctrl-C that occur when using {MYFD}< construct, as my investigation showed.
So in this issue I just want to mention that in case of any Ctrl-C problems, command true after exec should help.
Reactions are currently unavailable