category:enhancementdeprecated:platform-specifichelp wanted
描述
Related problem
On Windows, if I set the ComSpec environment variable (which specifies the command interpreter) to C:\Users\Victor\.cargo\bin\nu.exe, and then call libc::system (Microsoft docs) with whatever given command, I get the following error message:
Error: nu::shell::file_not_found (link)
× File not found
╭─[source:1:1]
1 │ nu
· ▲
· ╰── Could not access file '/c': "The system cannot find the file specified. (os error 2)"
╰────
I suspect this happens because the libc::system call expects the command interpreter to respond to the /c flag by running the given command. Unfortunately, nushell interprets the /c as a script file argument and attempts to open it, resulting in the above error message.
Describe the solution you'd like
Support /c as an alias for the -c argument on Windows (or all platforms, if that's easier).
Describe alternatives you've considered
No response
Additional context and details
No response