As described in the reddit post linked by Daniel the answer to my question is to use nvr.
In neovim's internal terminal you can run command like this:
<cmd> | nvr -o -