diff --git a/crates/nu-std/std/help.nu b/crates/nu-std/std/help.nu index 20a672dd90..df6c4c6ca6 100644 --- a/crates/nu-std/std/help.nu +++ b/crates/nu-std/std/help.nu @@ -515,7 +515,7 @@ def build-command-page [command: record] { $"- (ansi cyan)does not create(ansi reset) a scope." } ) | append ( - if ($command.is_builtin) { + if ($command.type == "built-in") { $"- (ansi cyan)is(ansi reset) a built-in command." } else { $"- (ansi cyan)is not(ansi reset) a built-in command." @@ -527,19 +527,19 @@ def build-command-page [command: record] { $"- (ansi cyan)is not(ansi reset) a subcommand." } ) | append ( - if ($command.is_plugin) { + if ($command.type == "plugin") { $"- (ansi cyan)is part(ansi reset) of a plugin." } else { $"- (ansi cyan)is not part(ansi reset) of a plugin." } ) | append ( - if ($command.is_custom) { + if ($command.type == "custom") { $"- (ansi cyan)is(ansi reset) a custom command." } else { $"- (ansi cyan)is not(ansi reset) a custom command." } ) | append ( - if ($command.is_keyword) { + if ($command.type == "keyword") { $"- (ansi cyan)is(ansi reset) a keyword." } else { $"- (ansi cyan)is not(ansi reset) a keyword." @@ -689,7 +689,7 @@ export def commands [ ...command: string@"nu-complete list-commands" # the name of command to get help on --find (-f): string # string to find in command names and usage ] { - let commands = (scope commands | where not is_extern | reject is_extern | sort-by name) + let commands = (scope commands | sort-by name) if not ($find | is-empty) { # TODO: impl find for external commands diff --git a/crates/nu-std/tests/test_help.nu b/crates/nu-std/tests/test_help.nu new file mode 100644 index 0000000000..1608950886 --- /dev/null +++ b/crates/nu-std/tests/test_help.nu @@ -0,0 +1,9 @@ +use std assert +use std help + +#[test] +def show_help_on_commands [] { + let help_result = (help alias) + assert ("item not found" not-in $help_result) +} +