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

feat: Allow users to render usage, help, and errors with ANSI #4248

Merged
merged 4 commits into from Sep 22, 2022

Conversation

epage
Copy link
Member

@epage epage commented Sep 22, 2022

This ensures usage, help, and error can render to a StyledStr and we expose a styled.ansi() method for displaying ANSI escape codes.

This gives users enough control that they can render to a different stream, even a pager if they want, while still getting color, see #1788 .

This supersedes #3874

Fixes #3873

This will open us up to providing the user with access to the styled
version in the future.
The writer is less convenient and isn't offering any performance
benefits of avoidign the extra allocations, so let's render instead.

This supersedes clap-rs#3874

Fixes clap-rs#3873
This gives users the control over where clap outputs while still getting
colors.  For users who want to support old windows versions, check out
`fwdansi` crate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return help message as String for Command
1 participant