def short_help

shake@0.7.0.0 · src/cli.bend:973

import shake@0.7.0.0/src/cli.bend as Cli
import Base

973# whether a short option word is a request for help: `-h` alone, before any
974# positional of the current command is bound, when the command spells
975# neither `-h` nor `--help`
976def short_help(+body: String, +args: List<&2, Arg>, seen: Bool) -> Bool:
977  Bool.and(String.eq(body, "h"),
978    Bool.and(Bool.not(seen),
979      Bool.and(Maybe.is_none(&2, Arg, by_short(args, "h")), Maybe.is_none(&2, Arg, by_long(args, "help")))))

Uses (10)

Used by (1)