Date:        Mon, 11 May 2026 16:06:15 -0400
    From:        Zachary Santer <[email protected]>
    Message-ID:  
<cabklju+7m6zdrm1b1okehyvf-c2a7fwkwxrx7kmrgtomqxg...@mail.gmail.com>

  | On Mon, May 11, 2026 at 3:18 PM Chet Ramey <[email protected]> wrote:
  | > More people than not have expressed a desire to have LINES and COLUMNS
  | > reflect the true window size.
  |
  | Huh? Yeah, I would be one of those people.

I wouldn't.   That is not what LINES and COLUMNS are intended to be
(or ever were).   They're supposed to be a method for the user to
override the default settings for length/width, not a method to find
out what the default settings are.

The standard is quite clear:

        Users and conforming applications should not set LINES unless
        they wish to override the system selection and produce output
        unrelated to the terminal characteristics.

There is essentially identical wording about COLUMNS

Shell(s) are supposed to be conforming applications.   bash shouldn't (ever)
be setting those variables.   Of course, we know it does, and backwards compat
is going to cause it to keep doing that.   It was always a mistake, but most
likely one that can't be fixed (except by switching to an unbroken shell,
dash wouldn't do that...)

That bash needs to know the sizes for readline is irrelevant.

And of course, this fork of the original message has nothing to do with
it being a mistake for a script to ever use LINES or COLUMNS (or a whole
bunch of other variables) for uses other than those defined.   Imagine
what would happen were the script to use HOME or similar as a general
variable?

lre


Reply via email to