mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 18:57:44 +02:00
Fix help flag (#4398)
* Match 'help command' to 'command --help' * Fix tests
This commit is contained in:
@ -33,12 +33,11 @@ fn eval_call(
|
||||
let decl = engine_state.get_decl(call.decl_id);
|
||||
|
||||
if call.named.iter().any(|(flag, _)| flag.item == "help") {
|
||||
let full_help = get_full_help(
|
||||
&decl.signature(),
|
||||
&decl.examples(),
|
||||
engine_state,
|
||||
caller_stack,
|
||||
);
|
||||
let mut signature = decl.signature();
|
||||
signature.usage = decl.usage().to_string();
|
||||
signature.extra_usage = decl.extra_usage().to_string();
|
||||
|
||||
let full_help = get_full_help(&signature, &decl.examples(), engine_state, caller_stack);
|
||||
Ok(Value::String {
|
||||
val: full_help,
|
||||
span: call.head,
|
||||
|
Reference in New Issue
Block a user