Cli.sample_args: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 4921-4930 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=4921&end_line=4930 import Base # Each arg in scope: its default as parse resolves it, else a sample value. def sample_args(items: List<&2, Item>) -> List<&2, Field>: match items: case Nil{}: Nil{} case Arg{usage, help, attrs} <> tail: +info = arg_info(usage, attrs) List.append(&2, Field, sample_field(resolve_default(info_default(info), info), info), sample_args(tail)) case head <> tail: sample_args(tail) Uses (8): 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=cli@0.2.0.0/cli.bend&name=Field 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=arg_info https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=info_default https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=resolve_default https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=sample_field