Change how to identify custom comamnd (#6187)

Co-authored-by: Frank <v-frankz@microsoft.com>
This commit is contained in:
Kangaxx-0
2022-08-02 16:40:07 -07:00
committed by GitHub
parent ce6df93d05
commit ebf845f431
5 changed files with 19 additions and 5 deletions

View File

@ -95,7 +95,7 @@ fn get_entry_in_aliases(engine_state: &EngineState, name: &str, span: Span) -> O
fn get_entry_in_commands(engine_state: &EngineState, name: &str, span: Span) -> Option<Value> {
if let Some(decl_id) = engine_state.find_decl(name.as_bytes(), &[]) {
let (msg, is_builtin) = if engine_state.get_decl(decl_id).get_block_id().is_some() {
let (msg, is_builtin) = if engine_state.get_decl(decl_id).is_custom_command() {
("Nushell custom command", false)
} else {
("Nushell built-in command", true)