You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected escaping of quotes when expanding variable to external command #6465
I was going through the other open issues in the quoting field right now but did not find a direct match to your more recent problem at a first glance. So definitely keep it around. Moving new issue for the particular problem might be a bit more discoverable (but I don't want to cause you extra work) Thanks for the easy reproducible example.
Title suggestion:
Unexpected escaping of quotes when expanding variable to external command.
changed the title [-]Double-quotes sill removed for external commands (related to #2095)[/-][+]Unexpected escaping of quotes when expanding variable to external command[/+]on Sep 14, 2022
External argument handling got rewritten in #12921 and quotes are no longer backslash-escaped on the cmd.exe path.
I could only run this on Linux, so please reopen with the output of a current Windows build if ^echo "X" still prints \"X\".
Activity
sholderbach commentedon Sep 2, 2022
Have you given the current release
0.67a try?MichelMunoz commentedon Sep 5, 2022
The result with 0.67 is:
which seems to work (at least if we execute the command we obtain the same result).
(maybe a side effect of #6154)
MichelMunoz commentedon Sep 5, 2022
There is something wrong though, with the initial example, simplified :
will produce output:
but if you use the underlying shell (here windows) and type
echo "X"you get the expected"X"and not what nushell produces...MichelMunoz commentedon Sep 12, 2022
Given my last comment, ie. what is the real problem with the current version, should I
?
sholderbach commentedon Sep 12, 2022
I was going through the other open issues in the quoting field right now but did not find a direct match to your more recent problem at a first glance. So definitely keep it around. Moving new issue for the particular problem might be a bit more discoverable (but I don't want to cause you extra work) Thanks for the easy reproducible example.
Title suggestion:
Unexpected escaping of quotes when expanding variable to external command.
[-]Double-quotes sill removed for external commands (related to #2095)[/-][+]Unexpected escaping of quotes when expanding variable to external command[/+]MichelMunoz commentedon Sep 14, 2022
Ok, done (+ minor edit of first comment to redirect to the relevant comment).
WindSoilder commentedon Sep 15, 2022
Thanks @rgwood mentioned about what happened in detail:
Rewrite run_external.rs (#12921)
kronberger-droid commentedon Nov 13, 2026
External argument handling got rewritten in #12921 and quotes are no longer backslash-escaped on the
cmd.exepath.I could only run this on Linux, so please reopen with the output of a current Windows build if
^echo "X"still prints\"X\".