def version.asks
import shake@0.7.0.0/src/cli.bend as Cliimport Base
1496# whether a word refused at `at` asks for the version: `--version`, or `-V`
1497# when the root does not spell `--version`, refused at the root of a spec
1498# with a version
1499def version.asks(+app: Cli, +at: List<&2, String>, +word: String) -> Bool:
1500 Cli{_n, _a, version, args, _s} = app
1501 Bool.and(Bool.or(String.eq(word, "--version"),
1502 Bool.and(String.eq(word, "-V"), Maybe.is_none(&2, Arg, by_long(args, "version")))),
1503 Bool.and(List.is_empty(&2, String, at), Maybe.is_some(&2, String, version)))