def scope_can_take
import cli@0.2.0.0/cli.bend as Cliimport Base
2986def scope_can_take(scope: Scope, count: Nat) -> Bool:
2987 match scope:
2988 case Scope{path, Spec{keys, args, slots, variadic, subs, has_sub,
2989 external, needs_sub, version, digit_short, inherit}}:
2990 Bool.or(Nat.is_lt(count, List.length(&2, ArgInfo, slots)), variadic)