apple / swift-argument-parser

Straightforward, type-safe argument parsing for Swift
Apache License 2.0
3.3k stars 311 forks source link

Ability to hide commands #642

Closed dcantah closed 2 months ago

dcantah commented 2 months ago

We can toggle the visibility of flags today, it would be nice if we could do the same with commands for folks who have hidden commands in their tools that are mostly for debug/development purposes.

dickoff commented 2 months ago

Doesn't this already exist with the shouldDisplay parameter of the CommandConfiguration? That will prevent it from showing up in the parent command's --help but it is still functional.

  ///   - shouldDisplay: A Boolean value indicating whether the command
  ///     should be shown in the extended help display.
dcantah commented 2 months ago

@dickoff Nope you're correct, I was grepping for visibility like what exists for flags before the transition from shouldDisplay 🤦 Friday is dangerous

rauhul commented 2 months ago

Maybe we should replace this with visibility...

dcantah commented 2 months ago

Happy to re-open and re-target this at adding visibility in some new constructor if we want