Skip to content

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.

2 participants