Re: [doc] LINES/COLUMNS auto-update in non-interactive shells contradicts manual
Chet Ramey <[email protected]> Mon, 11 May 2026 15:18:02 -0400
| Newsgroups | gmane.comp.shells.bash.bugs |
|---|---|
| Organization | ITS, Case Western Reserve University |
| Message-ID | <[email protected]> |
On 5/11/26 1:26 PM, Zachary Santer wrote: > On Mon, May 11, 2026 at 11:47 AM Chet Ramey <[email protected]> wrote: >> >> It's easy to do >> >> shopt -u checkwinsize >> : ${LINES:=24} ${COLUMNS:=80} >> >> if it matters, without having to wait for any changes to the shell. TheOP >> is already two major versions back. > > Guess what I'm asking for would be more along the lines of this, at > least in bash 5.3: > > if [[ -v COLUMNS || -v LINES ]]; then > shopt -u checkwinsize > else > ( : ) > trap '( : )' SIGWINCH > fi You can make the piece of shell script code as complicated as you want, without waiting for a distro to update bash. > My work machine is six bash major versions back. I'd still rather > things improve at some point. I think we disagree on whether or not this would be an improvement. More people than not have expressed a desire to have LINES and COLUMNS reflect the true window size. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
(application/pgp-signature, 203 B)
-----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCagIragUDAAAAAAAKCRC7WGnwZOp0q3Zt AJ9bzcPiA2ovdOVooCGcRlGgOp3zCACfYOtcf5SUSmqLGmNHDcubEf743TY= =1JpZ -----END PGP SIGNATURE-----