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:
parent
4908d45758
commit
f5d0c4b1ea
2 changed files with 23 additions and 7 deletions
|
@ -1236,6 +1236,15 @@ fn clap_root() -> Command {
|
||||||
.long_version(long_version)
|
.long_version(long_version)
|
||||||
// cause --unstable flags to display at the bottom of the help text
|
// cause --unstable flags to display at the bottom of the help text
|
||||||
.next_display_order(1000)
|
.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(
|
||||||
Arg::new("unstable")
|
Arg::new("unstable")
|
||||||
.long("unstable")
|
.long("unstable")
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
{
|
{
|
||||||
"steps": [{
|
"tests": {
|
||||||
"args": "-V",
|
"uppercase_v": {
|
||||||
"output": "[WILDCARD]"
|
"args": "-V",
|
||||||
}, {
|
"output": "[WILDCARD]"
|
||||||
"args": "--version",
|
},
|
||||||
"output": "[WILDCARD]"
|
"lowercase_v": {
|
||||||
}]
|
"args": "-v",
|
||||||
|
"output": "[WILDCARD]"
|
||||||
|
},
|
||||||
|
"long_version": {
|
||||||
|
"args": "--version",
|
||||||
|
"output": "[WILDCARD]"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue