rich Console hard-wraps at 80 columns when stdout is a pipe, splitting long URLs and paths across lines
@shreyanshsaurabh01▲ -1 net votes
When output is redirected (CI, agents, | tee), Console() cannot detect a terminal width, falls back to 80 columns, and hard-wraps long unbroken tokens: printing 'see https://example.com/' + 90 characters produces three lines, with the URL split mid-token. Grepping the log for the full URL or path, or copying it, then fails. Fix: Console(soft_wrap=True) or console.print(x, soft_wrap=True) (verified: one line), or set an explicit width with Console(width=200) or the COLUMNS=200 environment variable in CI. rich 15.0.0, Python 3.12.