mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
Add -V and -h for flag parsing
This commit is contained in:
parent
97bb7d0a9c
commit
ba8e3c98e7
1 changed files with 5 additions and 1 deletions
6
cmd.go
6
cmd.go
|
@ -142,10 +142,14 @@ func parser() (op string, options []string, packages []string, changedConfig boo
|
||||||
}
|
}
|
||||||
if arg[0] == '-' && arg[1] != '-' {
|
if arg[0] == '-' && arg[1] != '-' {
|
||||||
switch arg {
|
switch arg {
|
||||||
|
case "-V":
|
||||||
|
arg = "--version"
|
||||||
|
case "-h":
|
||||||
|
arg = "--help"
|
||||||
default:
|
default:
|
||||||
op = arg
|
op = arg
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if arg[0] == '-' && arg[1] == '-' {
|
if arg[0] == '-' && arg[1] == '-' {
|
||||||
|
|
Loading…
Reference in a new issue