Open mainrs opened 3 years ago
At that linked issue:
One can use a feature of the operating system for this, e.g. from cmd.exe,
start /wait notepad++.exe
I wonder if this works with all the other editors on Windows. Perhaps the -w
flags aren't necessary at all and we can just start every editor that way.
At least on Windows it should work. Although I wonder: wouldn't that mean that a terminal window pops up? Which wouldn't be the case for GUI apps with a dedicated flag?
I don't think a terminal window necessarily pops up. IIRC there is a flag to prevent that, but I'm not aware of the details of how Rust's process::Command
invokes CreateProcess
.
I don't have a Windows machine readily available for testing at the moment, but if someone wants to test e.g. EDITOR="start /wait code" cargo run
they can check if this would work.
At that linked issue:
One can use a feature of the operating system for this, e.g. from cmd.exe,
start /wait notepad++.exe
I wonder if this works with all the other editors on Windows. Perhaps the
-w
flags aren't necessary at all and we can just start every editor that way.
This doesn't work on notepad++. I attempted start /wait
it in many different configurations, it still doesn't block and immediately returns.
OK, good to know all that effort finding program-specific "wait for close" flags isn't for nought. :laughing:
I've opened an issue over at their repository, so once that gets added we could add back support for notepad++. https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9680