apple / apple/swift-argument-parser
Add help levels beyond `hidden`
- Dominant language
- Swift
- Stars
- 3.8k
- Forks
- 411
- Avg merge
- 7d 14h
- Merged PRs (30d)
- 15
Description
Current: hidden items are excluded from help. This is particularly useful for backend features that can be dangerous and extraneous features that clutter the help message but ultimately defeats the purpose of a utility meant to be shared and well documented in itself rather than man pages.
Suggested approach: Allow dangerous or extraneous features to be shown in "full help" by extending hidden beyond a BOOL to an optional enumeration. (This does not address long help, which is discussed under other tickets):
`hidden: .always, // excludes from help as currently implemented`
`hidden: .fullOnly, // allows participation in help in an extended "full help" output`
Notes:
* This _would_ affect USAGE participation
* This _does not_ address differing participation in the USAGE and ARGUMENTS/OPTIONS sections
* This _does not_ address how such help might be generated
* This _does not_ address how such help might be invoked
Contributor guide
Research direction
Start by reviewing how the current `hidden` setting affects help and USAGE participation in Swift Argument Parser. Define the optional `.always` and `.fullOnly` states while keeping the stated exclusions for long help, section-specific participation, help generation, and invocation. Done means the proposed distinction is implemented and its help behavior is covered.
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