v/vlib/cli/testdata/default_version_flag_no_command.vv
Turiiya c0fec31bef
cli: fix default flags when their command equivalents are disabled (#21469)
* always replace `\r\n` with `\n`

* fix

* test

* cleanup

* add doc comment
2024-05-08 14:11:40 +03:00

13 lines
222 B
V

import cli { Command, CommandFlag }
fn main() {
mut cmd := Command{
name: 'foo'
version: '0.1.0'
posix_mode: true
defaults: struct {
version: CommandFlag{false, true}
}
}
cmd.parse(['foo', '--version'])
}