From 6670b77b2778def0dc6d42674b008796e5740681 Mon Sep 17 00:00:00 2001 From: JT <547158+jntrnr@users.noreply.github.com> Date: Mon, 21 Feb 2022 12:58:04 -0500 Subject: [PATCH] Fix shorthand env duplicates (#4587) --- crates/nu-parser/src/parser.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/crates/nu-parser/src/parser.rs b/crates/nu-parser/src/parser.rs index f288ef682..e6c1d87bf 100644 --- a/crates/nu-parser/src/parser.rs +++ b/crates/nu-parser/src/parser.rs @@ -3551,14 +3551,16 @@ pub fn parse_expression( }, ]; + let expr = Expr::Call(Box::new(Call { + head: Span { start: 0, end: 0 }, + decl_id, + named: vec![], + positional, + })); + ( Expression { - expr: Expr::Call(Box::new(Call { - head: span(spans), - decl_id, - named: vec![], - positional, - })), + expr, custom_completion: None, span: span(spans), ty: Type::Unknown,