Revert "Add extern for nu command" (#16180)

Reverts nushell/nushell#16119
This commit is contained in:
Bahex
2025-07-15 19:18:44 +03:00
committed by GitHub
parent c4e8e040ce
commit 2df00ff498
12 changed files with 88 additions and 143 deletions

View File

@ -19,8 +19,7 @@ pub(crate) fn compile_call(
let decl = working_set.get_decl(call.decl_id);
// Check if this call has --help - if so, just redirect to `help`
// Special case the `nu` extern: we want to forward --help to the script
if call.named_iter().any(|(name, _, _)| name.item == "help") && decl.name() != "nu" {
if call.named_iter().any(|(name, _, _)| name.item == "help") {
let name = working_set
.find_decl_name(call.decl_id) // check for name in scope
.and_then(|name| std::str::from_utf8(name).ok())