1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

feat: add lowercase -v version flag (#23750)

Ref https://github.com/denoland/deno/issues/5289
This commit is contained in:
David Sherret 2024-05-22 20:20:20 -04:00 committed by GitHub
parent 4908d45758
commit f5d0c4b1ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 7 deletions

View file

@ -1236,6 +1236,15 @@ fn clap_root() -> Command {
.long_version(long_version)
// cause --unstable flags to display at the bottom of the help text
.next_display_order(1000)
.disable_version_flag(true)
.arg(
Arg::new("version")
.short('V')
.short_alias('v')
.long("version")
.action(ArgAction::Version)
.help("Print version")
)
.arg(
Arg::new("unstable")
.long("unstable")

View file

@ -1,9 +1,16 @@
{
"steps": [{
"args": "-V",
"output": "[WILDCARD]"
}, {
"args": "--version",
"output": "[WILDCARD]"
}]
"tests": {
"uppercase_v": {
"args": "-V",
"output": "[WILDCARD]"
},
"lowercase_v": {
"args": "-v",
"output": "[WILDCARD]"
},
"long_version": {
"args": "--version",
"output": "[WILDCARD]"
}
}
}