From d39e8c15fe38167d50be8b8ebac9166d49b59177 Mon Sep 17 00:00:00 2001 From: JT <547158+jntrnr@users.noreply.github.com> Date: Thu, 6 Jan 2022 10:32:56 +1100 Subject: [PATCH] Expand external command names (#682) --- crates/nu-parser/src/parser.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/nu-parser/src/parser.rs b/crates/nu-parser/src/parser.rs index 2bef822322..5e0d1a561d 100644 --- a/crates/nu-parser/src/parser.rs +++ b/crates/nu-parser/src/parser.rs @@ -193,6 +193,10 @@ pub fn parse_external_call( let mut args = vec![]; let name_span = spans[0]; let name = String::from_utf8_lossy(working_set.get_span_contents(name_span)).to_string(); + let cwd = working_set.get_cwd(); + let name = nu_path::expand_path_with(name, cwd) + .to_string_lossy() + .to_string(); let mut error = None; for span in &spans[1..] {