apple / swift-argument-parser

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

Add ParsableArguments/Command.usageString #634

Closed rauhul closed 3 months ago

rauhul commented 4 months ago

Adds a new API to ParsableArguments and ParsableCommand for getting the usage string. This allows clients to use argument-parser in a more piecemeal way to construct their own error screens.

rauhul commented 4 months ago

@swift-ci please test

natecook1000 commented 4 months ago

This looks great! Thanks for the extra test coverage on custom usage strings. Do we have a test for usage of a subcommand?

rauhul commented 3 months ago

@swift-ci please test

rauhul commented 3 months ago

@swift-ci please test