Allow multi-word aliases (#8777)

This commit is contained in:
Jakub Žádník
2023-04-07 00:05:09 +03:00
committed by GitHub
parent a29b61bd4f
commit 87ddba0193
2 changed files with 45 additions and 23 deletions

View File

@ -113,3 +113,16 @@ fn alias_wont_recurse2() {
assert!(actual.err.is_empty());
})
}
// Isuue https://github.com/nushell/nushell/issues/8103
#[test]
fn alias_multiword_name() {
let actual = nu!(r#"alias `foo bar` = echo 'test'; foo bar"#);
assert_eq!(actual.out, "test");
let actual = nu!(r#"alias 'foo bar' = echo 'test'; foo bar"#);
assert_eq!(actual.out, "test");
let actual = nu!(r#"alias "foo bar" = echo 'test'; foo bar"#);
assert_eq!(actual.out, "test");
}