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

Render command help text in book to avoid wrapping #364

Merged
merged 1 commit into from
Apr 11, 2020
Merged

Conversation

casey
Copy link
Owner

@casey casey commented Apr 11, 2020

The command --help text output in the book was very wide, which caused
it to be clipped and require scrolling horizontally to see it all.

This diff renders the text at 80 columns, which makes it visible without
scrolling at reasonable screen sizes.

To do this, env::run now checks for the presence of the environment
variable IMDL_TERM_WIDTH, which, if set to a positive integer, will be
passed to Clap::set_term_width.

bin/man now uses this to render the help text at 80 characters.

type: documentation

The command `--help` text output in the book was very wide, which caused
it to be clipped and require scrolling horizontally to see it all.

This diff renders the text at 80 columns, which makes it visible without
scrolling at reasonable screen sizes.

To do this, `env::run` now checks for the presence of the environment
variable `IMDL_TERM_WIDTH`, which, if set to a positive integer, will be
passed to `Clap::set_term_width`.

`bin/man` now uses this to render the help text at 80 characters.

type: documentation
pr: #364
@casey casey force-pushed the book-command-width branch from db1410c to f058072 Compare April 11, 2020 11:01
@casey casey marked this pull request as ready for review April 11, 2020 11:02
@casey casey merged commit f058072 into master Apr 11, 2020
@casey casey deleted the book-command-width branch April 11, 2020 11:04
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.

1 participant