1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cli: help/version abbrev optional + fix various inconsistencies (#5586)

This commit is contained in:
Tim Basel
2020-07-01 10:54:34 +02:00
committed by GitHub
parent ca1f47a742
commit 7386adfc99
4 changed files with 19 additions and 24 deletions

View File

@@ -79,7 +79,7 @@ fn (mut flag Flag) parse(args []string) ?[]string {
}
// check if first arg matches flag
fn (flag &Flag) matches(args []string) bool {
fn (mut flag Flag) matches(args []string) bool {
return
(flag.name != '' && args[0].starts_with('--${flag.name}')) ||
(flag.abbrev != '' && args[0].starts_with('-${flag.abbrev}'))