Cli.builtin_opts: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 6388-6396 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=6388&end_line=6396 import Base # -h and --help, without -h when an arg took it, then at a root with a # version -V and --version likewise. def builtin_opts(+items: List<&2, Item>, globals: List<&2, Item>, root: Bool) -> List<&2, Opt>: +args = List.append(&2, Item, items, globals) flag_opt(Bool.pick(List<&2, String>, Maybe.is_some(&2, OptFound, find_option(args, "-h")), ["--help"], ["-h", "--help"]), "Print help") <> version_opts(Bool.and(root, has_version_item(items)), args) Uses (14): 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.pick 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=Maybe.is_some 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=Opt https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=OptFound https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=find_option https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=flag_opt https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=has_version_item https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=version_opts