Cli.usage_elems: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 5263-5276 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=5263&end_line=5276 import Base # The path, [OPTIONS], required options, need_one groups as E06 writes them, # positionals, then the subcommand slot. def usage_elems(path: String, +items: List<&2, Item>, +globals: List<&2, Item>) -> List<&2, Segment>: +args = List.append(&2, Item, items, globals) +scope = List.append(&2, Item, globals, items) List.concat(&2, Segment, [ [Segment{path, [Bold{}]}], options_elem(has_plain_option(args)), required_options(args), group_elems(scope, scope, []), positional_elems(items), command_elems(has_sub_item(items), needs_sub(items)), ]) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.concat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Item https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Segment https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Style https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=command_elems https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=group_elems https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=has_plain_option https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=has_sub_item https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=needs_sub https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=options_elem https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=positional_elems https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=required_options