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

Unwrapping of --help information #441

Closed
rkadam opened this issue Oct 24, 2015 · 2 comments
Closed

Unwrapping of --help information #441

rkadam opened this issue Oct 24, 2015 · 2 comments

Comments

@rkadam
Copy link

rkadam commented Oct 24, 2015

Hi There,

I'm finding Click library very useful for developing command line application in Python. One such application that I've developed is Automate Atlassian from Command Line

One slightly annoying thing I've noticed is, --help options are not displayed to length of terminal. I've read about use of \b value, but don't seem that's applicable.

screen shot 2015-10-24 at 4 39 22 pm

Your guidance here will be very helpful.

Thank you,
Raju

@rkadam
Copy link
Author

rkadam commented Oct 24, 2015

Looks like there is already similar bug filed: #204

@chris-hailstorm
Copy link

Try this:

CONTEXT_SETTINGS = dict(
    max_content_width=400,
)

Then when you define the command or group, include that setting:

@click.group(
    chain=False,
    context_settings=CONTEXT_SETTINGS,
    )

This allows the help content to be up to 400 characters wide, and will shrink to the actual screen.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants