Shall we have a "close stdin" function?
Closed this issue · 2 comments
For some programs, no output will be given until its stdin is closed. One example is fzf
when it is being used as a filter to find matches in what's provided from stdin. I was using fzf
to write a preprocessor for asyncomplete.vim
, and having no "close stdin" function makes it hard to use async.vim
to make the code compatible with both vim and nvim.
My current solution is adding a close_stdin
function as what's done here. This solution is kinda awkward, as it doesn't follow the "interface similar to nvim" as other functions in this project. Also, at this point I don't think it is possible to create an interface which is compatible with vim that does everything nvim's interface does: nvim's chanclose
can close stdin, stdout or stderr, while vim only provides ch_close
which closes all channels and ch_close_in
which closes stdin.
Ops. Just noticed the pending PR (#34) is also about this.
Closing since #34 is merged.