Open ericfreese opened 6 years ago
Thanks for the suggestion! I have considered this method in the past, but the reasons for abandoning it escape me. (At least one reason is that I did not know about zle -F
at the time.)
zsh-async
does have some requirements that could be challenging using this approach:
IIRC there is also some difference in behavior between read
and zpty -r
(latter being more reliable) that might have affected this decision in the past. Although, this might not be relevant here.
Anywho, I'll take this up for consideration, and maybe experiment with it when I have some dead time 😄.
It would be nice to have a v2 using this other method. When I'm on my Linux machine, I usually get at least one of these zpty fd died, exiting
events.
I just came across a method for implementing async in zsh that doesn't require the zpty module. Take a look at this commit in zsh-autosuggestions: https://github.com/zsh-users/zsh-autosuggestions/pull/338
Not sure if it will work with zsh-async, but wanted to pass it along in case it might simplify things.