mirror of
https://github.com/nushell/nushell
synced 2024-12-27 13:33:16 +00:00
Add unescaping to external command parsing (#5399)
This commit is contained in:
parent
98ab31e15e
commit
92785ab92c
1 changed files with 8 additions and 2 deletions
|
@ -264,8 +264,11 @@ pub fn parse_external_call(
|
|||
error = error.or(err);
|
||||
Box::new(arg)
|
||||
} else {
|
||||
let (contents, err) = unescape_unquote_string(&head_contents, head_span);
|
||||
error = error.or(err);
|
||||
|
||||
Box::new(Expression {
|
||||
expr: Expr::String(String::from_utf8_lossy(&head_contents).to_string()),
|
||||
expr: Expr::String(contents),
|
||||
span: head_span,
|
||||
ty: Type::String,
|
||||
custom_completion: None,
|
||||
|
@ -285,8 +288,11 @@ pub fn parse_external_call(
|
|||
error = error.or(err);
|
||||
args.push(arg);
|
||||
} else {
|
||||
let (contents, err) = unescape_unquote_string(contents, *span);
|
||||
error = error.or(err);
|
||||
|
||||
args.push(Expression {
|
||||
expr: Expr::String(String::from_utf8_lossy(contents).to_string()),
|
||||
expr: Expr::String(contents),
|
||||
span: *span,
|
||||
ty: Type::String,
|
||||
custom_completion: None,
|
||||
|
|
Loading…
Reference in a new issue