diff --git a/traverse.go b/traverse.go index b53145b40..01000c540 100644 --- a/traverse.go +++ b/traverse.go @@ -162,8 +162,7 @@ loop: case !c.DisableFlagParsing && strings.HasPrefix(context.Value, "-") && (fs.IsInterspersed() || len(inPositionals) == 0): if f := fs.LookupArg(context.Value); f != nil && f.IsOptarg() && strings.Contains(context.Value, string(f.OptargDelimiter())) { LOG.Printf("completing optional flag argument for arg %#v\n", context.Value) - prefix, optarg := f.Split(context.Value) - context.Value = optarg + prefix, _ := f.Split(context.Value) switch f.Value.Type() { case "bool":