mirror of
https://github.com/Jguer/yay.git
synced 2025-10-06 00:05:37 -04:00
Merge pull request #63 from AnthonyLam/issue-49
Add -V and -h for flag parsing
This commit is contained in:
commit
878c606556
6
cmd.go
6
cmd.go
@ -142,11 +142,15 @@ func parser() (op string, options []string, packages []string, changedConfig boo
|
||||
}
|
||||
if arg[0] == '-' && arg[1] != '-' {
|
||||
switch arg {
|
||||
case "-V":
|
||||
arg = "--version"
|
||||
case "-h":
|
||||
arg = "--help"
|
||||
default:
|
||||
op = arg
|
||||
}
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
if arg[0] == '-' && arg[1] == '-' {
|
||||
changedConfig = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user