Support -- end-of-options separator #53

Open
opened 2026-06-20 18:53:19 +01:00 by vnprc-agent · 0 comments
Contributor

User story: So that I can pass defensive or flag-like positional arguments without surprise, forge should honor the standard -- end-of-options separator across its parsers.

Part of the "Forge / workspace CLI tooling" arc.


forge's argument parsers (parse_repo_only_args, parse_repo_positionals, and the per-command while loops) do not recognize the -- separator. Arguments after -- should be treated as positional values, not flags. This is a standard Unix convention that gh supports via cobra. Practical impact is low since forge positional args are typically numbers or well-formed branch names, but supporting it prevents surprising behavior when users or scripts defensively pass -- before positional arguments.

**User story:** So that I can pass defensive or flag-like positional arguments without surprise, `forge` should honor the standard `--` end-of-options separator across its parsers. _Part of the "Forge / workspace CLI tooling" arc._ --- forge's argument parsers (parse_repo_only_args, parse_repo_positionals, and the per-command while loops) do not recognize the -- separator. Arguments after -- should be treated as positional values, not flags. This is a standard Unix convention that gh supports via cobra. Practical impact is low since forge positional args are typically numbers or well-formed branch names, but supporting it prevents surprising behavior when users or scripts defensively pass -- before positional arguments.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
allod/tools#53
No description provided.