Skip to content

Commit

Permalink
traverse: fix partial optarg completion
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jul 22, 2023
1 parent 5d03e18 commit 1ffe0e5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions traverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 1ffe0e5

Please sign in to comment.