Cli.option_rows: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 5388-5400 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=5388&end_line=5400 import Base # The visible options under a heading, "" for Options. def option_rows(items: List<&2, Item>, +long: Bool, +heading: String) -> List<&2, Row>: match items: case Nil{}: Nil{} case Arg{+usage, help, +attrs} <> tail: List.append(&2, Row, option_row(Bool.and(Bool.not(arg_pos(usage)), Bool.and(Bool.not(has_hidden(attrs)), String.eq(find_heading(attrs), heading))), usage, help, attrs, long), option_rows(tail, long, heading)) case head <> tail: option_rows(tail, long, heading) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not 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=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq 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=Row https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=arg_pos https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=find_heading https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=has_hidden https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=option_row