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

Make comrak --help readable on my terminal #242

Merged
merged 1 commit into from Sep 13, 2022

Conversation

mgeisler
Copy link
Contributor

When I run comrak --help on my terminal, I see unwrapped and very hard-to-read output.

This is what I see:

image

The output is similar with a 100 columns terminal:

image

With the wrap_help Cargo option for Clap, we can make it produce much more readable output. The output will even adapt to the terminal width (similar to man(1)) and thus look good in many situations:

image

When I run `comrak --help` on my terminal, I see unwrapped and very
hard-to-read output.

With the `wrap_help` Cargo option for Clap, we can make it produce
much more readable output. The output will even adapt to the terminal
width (similar to man(1)) and thus look good in many situations.
@mgeisler
Copy link
Contributor Author

When playing with this, I noticed that the text finally wrapped correct with a terminal which is 120 columns wide. I'm basically suggesting not to hard-code this and instead use a millisecond or two at runtime to adapt the text to match :-)

@kivikakk
Copy link
Owner

This is a wonderful contribution — thanks so much, really appreciate it!

@kivikakk kivikakk merged commit d32c424 into kivikakk:main Sep 13, 2022
@mgeisler
Copy link
Contributor Author

Hi @kivikakk, thanks, I'm very happy to help where I can!

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.

None yet

2 participants