mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
feat: Add default docs for aliases, generated from the command they point to (#10825)
This commit is contained in:
@ -155,3 +155,11 @@ fn alias_ordering() {
|
||||
let actual = nu!(r#"alias bar = echo; def echo [] { 'dummy echo' }; bar 'foo'"#);
|
||||
assert_eq!(actual.out, "foo");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn alias_default_help() {
|
||||
let actual = nu!("alias teapot = echo 'I am a beautiful teapot'; help teapot");
|
||||
// There must be at least one line of help
|
||||
let first_help_line = actual.out.lines().next().unwrap();
|
||||
assert!(first_help_line.starts_with("Alias for `echo 'I am a beautiful teapot'`"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user