def help_path

shake@0.7.0.0 · main.bend:264

import shake@0.7.0.0/main.bend as Shake
import Base
import shake@0.7.0.0/src/cli.bend as S

264# the command path of a request for help (`help`, `help <path>`, `--help`,
265# `-h`), or None when the parse failed for another reason
266def help_path(err: S.ParseErr) -> Maybe<&2, List<&2, String>>:
267  match err:
268    case S.NeedHelp{path}:
269      Some{path}
270    case S.UnknownFlag{_at, _flag}:
271      None{}
272    case S.Missing{_at, _name}:
273      None{}
274    case S.NoValue{_at, _name}:
275      None{}
276    case S.BadValue{_at, _name, _value}:
277      None{}
278    case S.Unexpected{_at, _arg}:
279      None{}
280    case S.Repeated{_at, _name}:
281      None{}
282    case S.NeedVersion{}:
283      None{}

Uses (4)

Used by (2)