def group_global
import cli@0.2.0.0/cli.bend as Cliimport Base
2545# Whether each arg items put in group name is global().
2546def group_global(items: List<&2, Item>, +name: String) -> Bool:
2547 match items:
2548 case Nil{}: True{}
2549 case Arg{usage, help, +attrs} <> tail:
2550 Bool.and(Bool.or(Bool.not(arg_in_group(attrs, name)), has_global(attrs)),
2551 group_global(tail, name))
2552 case head <> tail: group_global(tail, name)