cmd/v: fix `-version` and `-v` collision

pull/4057/head
lutherwenxu 2020-03-18 19:42:41 +08:00 committed by GitHub
parent 91378583cc
commit e37fed437d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -77,8 +77,7 @@ fn parse_flags(flag string, f mut flag.Instance, prefs mut flag.MainCmdPreferenc
f.is_equivalent_to(['h', 'help'])
prefs.action = .help
}
'v', 'version' {
f.is_equivalent_to(['v', 'version'])
'version' {
prefs.action = .version
}
'-version', '-help' {