def env_names
import cli@0.2.0.0/cli.bend as Cliimport Base
7781# Each arg's env name in pre-order: an arg's own, then its subcommands'.
7782def env_names(items: List<&2, Item>) -> List<&2, String>:
7783 match items:
7784 case Nil{}: Nil{}
7785 case Arg{usage, help, attrs} <> tail:
7786 List.append(&2, String, find_envs(attrs), env_names(tail))
7787 case Sub{name, about, children} <> tail:
7788 List.append(&2, String, env_names(children), env_names(tail))
7789 case head <> tail: env_names(tail)