mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
allow export alias
in repl (#15054)
# Description Fixes: #15048 The issue is happened while `parse_export_in_block`, it makes a call to `parse_internal_call`, which may be an error. But in reality, these errors are not useful, all useful errors will be generated by `parse_xxx` at the end of the function. # User-Facing Changes The following code should no longer raise error: ``` export alias a = overlay use ``` # Tests + Formatting Added 1 test. # After Submitting NaN
This commit is contained in:
@ -163,3 +163,9 @@ fn alias_default_help() {
|
||||
let first_help_line = actual.out.lines().next().unwrap();
|
||||
assert!(first_help_line.starts_with("Alias for `echo 'I am a beautiful teapot'`"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn export_alias_with_overlay_use_works() {
|
||||
let actual = nu!("export alias teapot = overlay use");
|
||||
assert!(actual.err.is_empty())
|
||||
}
|
||||
|
Reference in New Issue
Block a user