This is actually much trickier than originally thought from your initial question.
I thought you wanted to interact with stdout, stdout from an external process.
Porcelain is fine for that. I've tried playing around with this.
Porcelain.shell("/usr/bin/vi /tmp/foobar < /dev/tty > /dev/tty")
and this
Porcelain.shell("/usr/bin/vi /tmp/foobar < /dev/ttys006 > /dev/ttys006")
The first doesn't work at all on OS X and the second does allow me
to at least open vi, but it does not work well.
This is one of the places where things that are easy in other languages are
fairly complex in Elixir.
I did some poking around in ex_top and I think the magic is in this line.
Port.open({:spawn, "tty_sl -c -e"}, [:binary, :eof])
Still digging...
- Booker C. Bense