swift-argument-parser icon indicating copy to clipboard operation
swift-argument-parser copied to clipboard

Add help levels beyond `hidden`

Open erica opened this issue 4 years ago • 1 comments

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

erica avatar May 20 '20 15:05 erica

@erica I don't know if you're still following this issue, but does main (after the #412 merge) solve this issue? Arguments with visibility: .hidden will only show up in the --help-hidden output.

rauhul avatar Feb 20 '22 06:02 rauhul