Fix: (issue#1254) short options handling needs to proceed from last terminated error

This commit is contained in:
Naveen Gogineni
2021-03-28 08:18:46 -04:00
parent 850cf82509
commit 156d47e696
2 changed files with 34 additions and 2 deletions

View File

@@ -46,8 +46,9 @@ func parseIter(set *flag.FlagSet, ip iterativeParser, args []string, shellComple
return err
}
// swap current argument with the split version
args = append(args[:i], append(shortOpts, args[i+1:]...)...)
// Start processing only from failed argument and not
// from beginning
args = append(shortOpts, args[i+1:]...)
argsWereSplit = true
break
}