Skip to content

Command::disable_version_flag

since 0.1.0

Disables -V and —version flag.

name = "myprog"
version = "1.0.0"
disable-version-flag = true
[args]
version = { long = "version", action = "version", help = "Print version" }
Terminal window
myprog -V
Terminal window
error: unexpected argument '-V' found
Usage: myprog
For more information, try '--help'.
name = "myprog"
version = "1.0.0"
disable-version-flag = true
[args]
version = { long = "version", action = "version", help = "Print version" }
Terminal window
myprog --version
Terminal window
myprog 1.0.0