diff --git a/arguments.go b/arguments.go index c5c5c83..c358d2a 100644 --- a/arguments.go +++ b/arguments.go @@ -269,6 +269,9 @@ func findAllOptionArgs(argString []string, keys []string, infoArgs *orderedmap.O continue } vv := iA.(*ArgInfo) + if vv.Match == ArgContent { + return *args, true, argString, keys + } if vv.Required { if vv.TypeGuard != String { var value string diff --git a/util.go b/util.go index a1fc31e..8535454 100644 --- a/util.go +++ b/util.go @@ -35,7 +35,7 @@ func RemoveItems(slice []string, indexes []int) []string { } copy(newSlice, slice) for _, v := range indexes { - if len(newSlice) > v+1 && v != 0 { + if len(newSlice) < v+1 && v != 0 { v = v - 1 } //newSlice[v] = newSlice[len(newSlice)-1]