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

Wrapping not enabled on some columns, cutting off content #33

Closed
paw-lu opened this issue Mar 3, 2022 · 3 comments
Closed

Wrapping not enabled on some columns, cutting off content #33

paw-lu opened this issue Mar 3, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@paw-lu
Copy link

paw-lu commented Mar 3, 2022

Great project, thanks for sharing it!

I have some cli values with a lot of possible values.

When --help is rendered via rich-click, the options are cut off.

nbp --help

 Usage: nbp [OPTIONS] FILE...

 Render a Jupyter Notebook in the terminal.

╭─ Options ────────────────────────────────────────────────────────────────────╮
│  *                        file  FILE...               Jupyter notebook       │
│                                                       file(s) to render on   │
│                                                       the terminal. Use a    │
│                                                       dash ('-') or pipe in  │
│                                                       data to the command    │
│                                                       to read from standard  │
│                                                       input.                 │
│                                                       [required]             │
│     --theme               -t    [default|emacs|frie…  The theme to use for   │
│                                                       syntax highlighting.   │
│                                                       Call                   │
│                                                       ``--list-themes`` to   │
│                                                       preview all available  │
│                                                       themes.                │

Screen Shot 2022-03-02 at 9 44 21 PM

@ewels
Copy link
Owner

ewels commented Mar 3, 2022

In this scenario it may be worth moving the metavars to be appended, see https://github.com/ewels/rich-click#metavars

Let me know if you have any suggestions on how to make this part of the docs easier to find, or better functionality.

I'm a little surprised that they're truncated though. Not sure where in the code this is being done. I'm going to leave this issue open until I investigate as it could be a rich table setting that I've overlooked or something.

@ewels ewels closed this as completed in 27574a0 Mar 3, 2022
ewels added a commit that referenced this issue Mar 3, 2022
Add explicit mention of choices, add example and screenshots.

See #33
@ewels
Copy link
Owner

ewels commented Mar 3, 2022

Ok yeah, it was rich that was truncating these strings. That should be solved now with the full list wrapping on to new lines.

I've also improved the readme with a new example and some screenshots: https://github.com/ewels/rich-click#metavars-and-option-choices

@ewels ewels added the bug Something isn't working label Mar 3, 2022
@paw-lu
Copy link
Author

paw-lu commented Mar 3, 2022

Ok yeah, it was rich that was truncating these strings. That should be solved now with the full list wrapping on to new lines.

Really appreciated, thanks!

I've also improved the readme with a new example and some screenshots: https://github.com/ewels/rich-click#metavars-and-option-choices

Also, thanks. For reference, I didn't know that the list of possible values were known as metavars, but the new README changes makes that really clear.

Again, thanks for the project here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants