apple / apple/swift-argument-parser

Exclusive Option Groups

Open
#482 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Swift
Stars
3.8k
Forks
411
Avg merge
7d 14h
Merged PRs (30d)
15

Description

Flags can be mutually exclusive, but there isn't a way to do that for options. e.g. you can't have `[--arch | --target ]` Ideally these could be nested like `[[--one --two ] | [--combo ]]`

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing mutually exclusive flag handling and the option-parsing entry points. Compare their behavior with the proposed exclusive option groups, including nested alternatives such as `[--arch | --target ]` and `[[--one --two ] | [--combo ]]`. Done means option groups enforce the requested exclusivity and are covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.