Hi everyone, this is my first post on this forum ![]()
I am learning Elixir and I wish to write my software/scripts with it, I really love the syntax.
One problem I encountered is launching a system command and interact with it through stdin/stdout.
For example something like:
System.cmd("sudo", ["whoami"])
System.cmd("vi", [])
doesn’t work at all because they require access to stdin/stdout (seems like they can’t find a tty).
I searched a lot on the web and I found some resources with some workaround (eg. using a GUI askpass for sudo or launching system commands in another terminal); such resources I have found are a bit old.
My question is: is the situation changed? Is there any way, for example using Ports, to make the commands above work “as expected” like in other programming language?
For example in Python I write:
import subprocess
subprocess.run("vi")
This is the only “missing feature” that prevents me from porting all my software and scripts to Elixir.
Thanks in advance ![]()






















