mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:45:45 +02:00
Reorder help <keyword>
priority (#7929)
# Description `help <keyword>` will now search for `<keyword>` in aliases first, then commands. This matches the way the parser resolves aliases before commands. # User-Facing Changes Not significant
This commit is contained in:
@ -342,3 +342,15 @@ fn help_modules_main_2() {
|
||||
|
||||
assert_eq!(actual.out, "spam");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn help_alias_before_command() {
|
||||
let code = &[
|
||||
"alias SPAM = print 'spam'",
|
||||
"def SPAM [] { 'spam' }",
|
||||
"help SPAM",
|
||||
];
|
||||
let actual = nu!(cwd: ".", nu_repl_code(code));
|
||||
|
||||
assert!(actual.out.contains("Alias"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user