This commit is contained in:
Kovid Goyal 2023-03-05 14:25:19 +05:30
parent db972f3442
commit 99b23c5c66
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -241,13 +241,11 @@ func parse_args(args ...string) (delegate_to_rg bool, sanitized_args []string, k
chars[i] = string(ch) chars[i] = string(ch)
_, ok = alias_map[string(ch)] _, ok = alias_map[string(ch)]
if !ok { if !ok {
sanitized_args = append(sanitized_args, x)
break break
} }
} }
if !ok { if ok {
sanitized_args = append(sanitized_args, x)
continue
}
for _, ch := range chars { for _, ch := range chars {
target := alias_map[ch] target := alias_map[ch]
if options_that_expect_args[target] { if options_that_expect_args[target] {
@ -257,6 +255,7 @@ func parse_args(args ...string) (delegate_to_rg bool, sanitized_args []string, k
sanitized_args = append(sanitized_args, "-"+ch) sanitized_args = append(sanitized_args, "-"+ch)
} }
} }
}
} else { } else {
sanitized_args = append(sanitized_args, x) sanitized_args = append(sanitized_args, x)
} }