Remove custom escaping for external args. (#2095)

Our own custom escaping unfortunately is far too simple to cover all cases.
Instead, the parser will now do no transforms on the args passed to an external
command, letting the process spawning library deal with doing the appropriate
escaping.
This commit is contained in:
Jason Gedge
2020-07-02 19:29:28 -04:00
committed by GitHub
parent 7813063c93
commit 180290f3a8
3 changed files with 34 additions and 16 deletions

View File

@ -192,6 +192,15 @@ mod external_words {
assert_eq!(actual.out, "joturner@foo.bar.baz");
}
#[test]
fn no_escaping_for_single_quoted_strings() {
let actual = nu!(cwd: ".", r#"
nu --testbin cococo 'test "things"'
"#);
assert_eq!(actual.out, "test \"things\"");
}
}
mod nu_commands {