Debian Bookworm always sets `COLUMNS` to be a little less than the actual terminal width
12
votes
2
answers
933
views
On Debian Bookworm, the
However,
$COLUMNS
bash variable is always a little smaller than the actual terminal width. This leaves a little space on the right side whenever I run a program that runs through less
, such as man
, git help commit
, etc. Here's a screenshot of the output of man bash
, note the margin on the right side:

$COLUMNS
on my Fedora is set to the full width of the terminal emulator.
How can I make the $COLUMNS
variable always equal to the full width of the terminal emulator?
Since there are so many programs that would go through the pager, I prefer not using a solution that sets COLUMNS=
before a particular program launches.
The solution should also be able to change $COLUMNS
when the terminal window resizes, like what bash does by default.
Asked by xuhdev
(597 rep)
Dec 25, 2024, 05:42 AM
Last activity: Jan 3, 2025, 06:40 AM
Last activity: Jan 3, 2025, 06:40 AM