Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ParsableArguments/Command.usageString #634

Merged
merged 2 commits into from May 1, 2024
Merged

Conversation

rauhul
Copy link
Contributor

@rauhul rauhul commented Apr 23, 2024

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 rauhul added the enhancement New feature or request label Apr 23, 2024
@rauhul
Copy link
Contributor Author

rauhul commented Apr 23, 2024

@swift-ci please test

@natecook1000
Copy link
Member

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

@rauhul
Copy link
Contributor Author

rauhul commented May 1, 2024

@swift-ci please test

@rauhul rauhul enabled auto-merge (squash) May 1, 2024 00:06
Copy link
Member

@natecook1000 natecook1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

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
Copy link
Contributor Author

rauhul commented May 1, 2024

@swift-ci please test

@rauhul rauhul merged commit cfac15f into main May 1, 2024
2 checks passed
@rauhul rauhul deleted the rauhul/usageString branch May 1, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants