Skip to content

trace: stop command matching after -- for withargs defaults - #663

Open
team-humaki wants to merge 1 commit into
alecthomas:masterfrom
team-humaki:dashdash-stops-command-matching
Open

team-humaki wants to merge 1 commit into
alecthomas:masterfrom
team-humaki:dashdash-stops-command-matching

Conversation

@team-humaki

Copy link
Copy Markdown

Fixes #660

-- already ends flag parsing. Remaining tokens were still matched against sibling commands, so a default:"withargs" passthrough could not receive a payload that collided with a sibling name (app -- merge).

When -- is seen on a node with a withargs default, route the remainder to that default instead of command matching.

go test . passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

-- protects arguments from flag parsing but not from command matching, which is surprising with a default:"withargs" passthrough command

1 participant