mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 17:17:22 +01:00
Support -r=foo syntax
This commit is contained in:
parent
4e67c1e886
commit
97006ade19
11
parser.go
11
parser.go
@ -735,9 +735,16 @@ func (parser *arguments) parseShortOption(arg string, param string) (usedNext bo
|
||||
for k, _char := range arg {
|
||||
char := string(_char)
|
||||
|
||||
if hasParam(char) {
|
||||
if k < len(arg)-2 {
|
||||
if k < len(arg)-1 {
|
||||
if arg[k+1] == '=' {
|
||||
err = parser.addParam(char, arg[k+2:])
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if hasParam(char) {
|
||||
if k < len(arg)-1 {
|
||||
err = parser.addParam(char, arg[k+1:])
|
||||
} else {
|
||||
usedNext = true
|
||||
err = parser.addParam(char, param)
|
||||
|
Loading…
Reference in New Issue
Block a user