Carets introduce a difficult situation since they are essentially
"lossy" when parses. Consider this in cmd.exe:
> echo "foo^bar"
"foo^bar"
> echo foo^^bar
foo^bar
The two commands produce different results, but are both parsed by the
shell as `foo^bar`, and there's essentially no sensible way to tell what
was actually passed in. This implementation assumes the quoted variation
(the first) since it is easier to implement, and arguably the more common
case.
The command can be safely quoted in this case since non-quotable commands
(cmd built-in) do not have parentheses.
Note that this change only applies to the command, not arguments.
Parentheses in arguments can be correctly interpreted without quotes, and
the quotes, like spaces, will cause incorrect outputs for echo etc.