def zsh_pre

cli@0.2.0.0 · cli.bend:6751

import cli@0.2.0.0/cli.bend as Cli
import Base

6751# The prefix of an option's specs: * when it repeats, else its names as a
6752# group that excludes each other.
6753def zsh_pre(kind: UsageKind, +names: List<&2, String>) -> String:
6754  match kind:
6755    case CountKind{}: "*"
6756    case OptionKind{True{}}: "*"
6757    case _:
6758      Bool.pick(String, Nat.is_lt(1n, List.length(&2, String, names)),
6759        String.concat(["(", String.join(names, " "), ")"]), "")

Uses (9)

Used by (1)