From 4fd73ef54a99da941c959d96e6e266c48214b639 Mon Sep 17 00:00:00 2001 From: JT <547158+jntrnr@users.noreply.github.com> Date: Mon, 11 Apr 2022 07:37:22 +1200 Subject: [PATCH] Allows aliases in use lists (#5150) --- crates/nu-command/src/core_commands/use_.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-command/src/core_commands/use_.rs b/crates/nu-command/src/core_commands/use_.rs index f0eed22e1..073d9fe2d 100644 --- a/crates/nu-command/src/core_commands/use_.rs +++ b/crates/nu-command/src/core_commands/use_.rs @@ -81,7 +81,7 @@ https://www.nushell.sh/book/thinking_in_nushell.html#parsing-and-evaluation-are- for (name, span) in names { if let Some(id) = overlay.get_env_var_id(name) { output.push((name.clone(), id)); - } else if !overlay.has_decl(name) { + } else if !overlay.has_decl(name) && !overlay.has_alias(name) { return Err(ShellError::EnvVarNotFoundAtRuntime( String::from_utf8_lossy(name).into(), *span,