Allow other options to follow --color without spec

This commit is contained in:
Junegunn Choi 2016-10-21 19:20:00 +09:00
parent 9b9ad39143
commit cfdb00b971
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -246,7 +246,7 @@ func nextString(args []string, i *int, message string) string {
}
func optionalNextString(args []string, i *int) string {
if len(args) > *i+1 {
if len(args) > *i+1 && !strings.HasPrefix(args[*i+1], "-") {
*i++
return args[*i]
}