nushell/crates/nu-command/src/system
Reilly Wood 49ab559992
Trim quotes when shelling out to cmd.exe (#7740)
Closes #6337 and #5366. Prior to this PR, when "shelling out" to cmd.exe
on Windows we were not trimming quotes correctly:

```bash
〉^echo "foo"
\"foo\"
```
After this change, we do:
```bash
〉^echo "foo"
foo
```

### Breaking Change

I ended up removing `dir` from the list of supported cmd.exe internal
commands as part of this PR.

For this PR, I extracted the argument-cleaning-and-expanding code from
`spawn_simple_command()` for reuse in `spawn_cmd_command()`. This means
that we now expand globs, which broke some tests for the `dir` cmd.exe
internal command.

I probably could have kept the tests working, but... tbh, I don't think
it's worth it. I don't want to make the `cmd.exe` functionality any more
complicated than it already is, and calling `dir` from Nu is always
going to be weird+hacky compared to `ls`.
2023-01-13 11:00:30 -08:00
..
benchmark.rs add input_output_types() to benchmark,cd and config reset (#7455) 2022-12-13 06:10:55 -06:00
complete.rs Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
exec.rs Add "fall-through" signatures (#7527) 2022-12-22 00:33:26 +02:00
mod.rs add a new command to query the registry on windows (#6670) 2022-10-07 13:54:36 -05:00
nu_check.rs Expand Nushell's help system (#7611) 2022-12-30 17:44:37 +02:00
ps.rs Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
registry_query.rs Further cleanup of Span::test_data usage + span fixes (#7595) 2022-12-24 07:41:57 -06:00
run_external.rs Trim quotes when shelling out to cmd.exe (#7740) 2023-01-13 11:00:30 -08:00
sys.rs Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
which_.rs Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00