mafredri / zsh-async

Because your terminal should be able to perform tasks asynchronously without external tools!
MIT License
756 stars 37 forks source link

Consider moving away from zpty if possible #24

Open ericfreese opened 6 years ago

ericfreese commented 6 years ago

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.

mafredri commented 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 😄.