Allows aliases in use lists (#5150)

This commit is contained in:
JT 2022-04-11 07:37:22 +12:00 committed by GitHub
parent 58f395989a
commit 4fd73ef54a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,