Revert "Refactor external command (#6083)" (#6116)

This reverts commit 0646f1118c.
This commit is contained in:
JT
2022-07-26 05:37:15 +12:00
committed by GitHub
parent 3643ee6dfd
commit 475d32045f
7 changed files with 24 additions and 60 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).is_custom_command() {
let (msg, is_builtin) = if engine_state.get_decl(decl_id).get_block_id().is_some() {
("Nushell custom command", false)
} else {
("Nushell built-in command", true)