Prefer `.ps1` than `.cmd` when both file exists in path
What new feature should Elvish have?
Currenlty on Windows, when both .ps1 and .cmd exists for a command (e.g. scoop), elvish will prefer invoking the .cmd.
However, cmd scripts are bad on UX. Specifically, It prompts "Terminate batch job (Y/N)" when Ctrl+C pressed. Therefore, it should be avoided if alternatives exists.
Output of "elvish -version"
0.21.0+official
Code of Conduct
- [X] I agree to follow Elvish's Code of Conduct.
There are a few workarounds to suppress the "Terminate batch job" prompt documented here: https://superuser.com/questions/1705792/how-to-suppress-windows-batch-job-termination-confirmation
See my comment in #1854 about this feature request; I'm leaning towards rejecting this, but maybe it's a good idea to special-case .elv files on Windows instead.
There are a few workarounds to suppress the "Terminate batch job" prompt documented here: https://superuser.com/questions/1705792/how-to-suppress-windows-batch-job-termination-confirmation
This only applies when I'm writing the script. However, in most of the times, the .cmd files are provided by package managers, e.g., scoop.