Is There a Way to Disable Automatic Line Breaks in Rich When Printing Long Lines? #3821
Unanswered
Erimus-Koo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I really like the auto-coloring feature when printing with Rich. However, one thing has been bothering me: Rich automatically inserts line breaks based on the window size.
For example, when displaying a long file path, most modern terminals allow you to click to open the path or file directly. But after Rich adds extra spaces or line breaks, this no longer works. Similarly, if I want to copy a long path, or copy a piece of data like a list or dict, the formatting is incorrect due to the inserted line breaks or spaces.
Right now, I’ve worked around this by overriding print behavior, but it's a bit complicated. I’d like to know: is there an official parameter that controls whether Rich adds these extra line breaks?
Beta Was this translation helpful? Give feedback.
All reactions