I'm writing console program. I want to launch vim from that program, wait until user exits it and continue execution.
let editorTask = NSTask()
editorTask.currentDirectoryPath = "/Users/vbezhenar/Documents"
editorTask.launchPath = "/usr/bin/vim"
editorTask.arguments = ["/Users/vbezhenar/Documents/file"]
editorTask.launch()
editorTask.waitUntilExit()
I'm running this program from terminal. I can see running vim with ps aux|grep vim in another terminal, but I don't see any vim user interface. Console just hangs until I press "Ctrl+C".
It seems like problem with stdout or stdin, but documentation clearly states that by default those file descriptors are inherited from launching process so there shouldn't be any problems. I don't alter environment either so it should inherit too.
I tried to launch "/bin/sh", it didn't work too.