mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 04:45:04 +02:00
Color named type help especial case. (#1263)
Refactored out help named type as switch.
This commit is contained in:
committed by
GitHub
parent
07191754bf
commit
fe4ad5f77e
@ -159,7 +159,7 @@ pub(crate) fn get_help(
|
||||
long_desc.push_str("\nflags:\n");
|
||||
for (flag, ty) in signature.named {
|
||||
match ty.0 {
|
||||
NamedType::Switch | NamedType::Help => {
|
||||
NamedType::Switch => {
|
||||
long_desc.push_str(&format!(
|
||||
" --{}{} {}\n",
|
||||
flag,
|
||||
|
@ -63,7 +63,6 @@ fn signature_dict(signature: Signature, tag: impl Into<Tag>) -> Value {
|
||||
NamedType::Mandatory(_) => sig.push_value(for_spec(name, "flag", true, &tag)),
|
||||
NamedType::Optional(_) => sig.push_value(for_spec(name, "flag", false, &tag)),
|
||||
NamedType::Switch => sig.push_value(for_spec(name, "switch", false, &tag)),
|
||||
NamedType::Help => sig.push_value(for_spec("help", "switch", false, &tag)),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user