def help.version_row

shake@0.7.0.0 · src/cli.bend:2052

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

2052# the row for `--version`, and `-V` when the command does not spell it, on a
2053# page with a version; none when the command spells long `version`
2054def help.version_row(version: Maybe<&2, String>, long: Maybe<&2, Arg>, short: Maybe<&2, Arg>) -> List<&2, Arg>:
2055  match version:
2056    case None{}:
2057      []
2058    case Some{_v}:
2059      match long:
2060        case None{}:
2061          [flag("version", help.spell(short, "V"), Some{"version"}, "Print version")]
2062        case Some{_a}:
2063          []

Uses (6)

Used by (1)