Allow aliases to expand and ignore painting outside of lines (#3492)

This commit is contained in:
JT
2021-05-26 17:58:32 +12:00
committed by GitHub
parent 1ee51f2afa
commit 41834d16d6
3 changed files with 19 additions and 1 deletions

View File

@ -306,6 +306,18 @@ fn run_custom_command_with_empty_rest() {
assert_eq!(actual.err, r#""#);
}
#[test]
fn alias_a_load_env() {
let actual = nu!(
cwd: ".",
r#"
def activate-helper [] { [[name, value]; [BOB, SAM]] }; alias activate = load-env (activate-helper); activate; $nu.env.BOB
"#
);
assert_eq!(actual.out, r#"SAM"#);
}
#[test]
fn let_variable() {
let actual = nu!(