Since there are no single answer valid for all cases, I went for two different ones: - one for the tty case 80, - one for the non-tty case 256.
The COLUMNS environment variable is always respected *first* so that users have a way to override any heuristic we may use.
pagers can use either the COLUMNS variable or go for the bzrlib.osutils default values (+default_tty_width or +default_non_tty_width).
I added tests for most of the cases except windows (since I can't test that), if any reviewer can add a such a test I'll gladly add it.
I also addressed bug #62539 while I was there.
« Back to merge proposal
Since there are no single answer valid for all cases, I went for two different ones:
- one for the tty case 80,
- one for the non-tty case 256.
The COLUMNS environment variable is always respected *first* so that users have a way
to override any heuristic we may use.
pagers can use either the COLUMNS variable or go for the bzrlib.osutils default values non_tty_ width).
(+default_tty_width or +default_
I added tests for most of the cases except windows (since I can't test that), if any reviewer can
add a such a test I'll gladly add it.
I also addressed bug #62539 while I was there.