Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Thread developing on austin-group about LINES/COLUMNS



I read it that this suggests that zsh is currently not POSIX-compliant
with respect to LINES/COLUMNS.  The proposed change to the standard would
be closer to zsh's behavior, but would require those variables to lose
their auto-update behavior in the event that they are explicitly assigned,
which I do not believe zsh presently provides for.



---------- Forwarded message ----------
Date: Thu, 18 Dec 2003 16:34:15 -0800
From: Jason Zions <jasonzio@xxxxxxxxxxxxxxxxxxx>
To: Paul Eggert <eggert@xxxxxxxxxxx>, David Korn <dgk@xxxxxxxxxxxxxxxx>
Cc: austin-group-l@xxxxxxxxxxxxx
Subject: RE: LINES and COLUMNS variables
Resent-Date: 19 Dec 2003 00:34:45 -0000
Resent-From: austin-group-l@xxxxxxxxxxxxx
Resent-To: austin-group-l@xxxxxxxxxxxxx

Bummer. I seem to recall this is pretty common (and useful) behavior. 

-----Original Message-----
From: Paul Eggert [mailto:eggert@xxxxxxxxxxx] 
Sent: Thursday, December 18, 2003 4:17 PM
To: David Korn
Cc: austin-group-l@xxxxxxxxxxxxx
Subject: Re: LINES and COLUMNS variables

At Thu, 18 Dec 2003 09:59:20 -0500 (EST), David Korn
<dgk@xxxxxxxxxxxxxxxx> writes:

> Is a shell that changes the value of LINES and/or COLUMNS when the 
> window size changes a conforming shell?

I'd say no.
<http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html#
tag_08>
says "The implementation adds or changes environment variables named in
IEEE Std 1003.1-2001 only as specified in IEEE Std 1003.1-2001."
The standard doesn't say that the shell changes the value of LINES
and/or COLUMNS, so a conforming shell cannot change them.






---------- Forwarded message ----------
Date: Thu, 18 Dec 2003 16:45:08 -0800
From: Bruce Korb <bkorb@xxxxxxxxxxx>
To: Paul Eggert <eggert@xxxxxxxxxxx>
Cc: David Korn <dgk@xxxxxxxxxxxxxxxx>, austin-group-l@xxxxxxxxxxxxx
Subject: Re: LINES and COLUMNS variables
Resent-Date: 19 Dec 2003 00:47:35 -0000
Resent-From: austin-group-l@xxxxxxxxxxxxx
Resent-To: austin-group-l@xxxxxxxxxxxxx

Paul Eggert wrote:
> 
> At Thu, 18 Dec 2003 09:59:20 -0500 (EST), David Korn <dgk@xxxxxxxxxxxxxxxx> writes:
> 
> > Is a shell that changes the value of LINES and/or COLUMNS when
> > the window size changes a conforming shell?
> 
> I'd say no.
> <http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html#tag_08>
> says "The implementation adds or changes environment variables named
> in IEEE Std 1003.1-2001 only as specified in IEEE Std 1003.1-2001."
> The standard doesn't say that the shell changes the value of LINES
> and/or COLUMNS, so a conforming shell cannot change them.

Cool.  Let's change the standard.  The primary purpose of the standard
is to specify a workable set of requirements that conform to most current
implementations.  The whole idea behind the LINES and COLUMNS is to make it
possible work with text screens of sizes that differ from 24X80.

Now, that said, it can be reasonably argued that if someone says,
``COLUMNS=132'' then the shell should not willy-nilly go changing it
automatically.  There are already some variables that are in some sense
magical and they lose their magic when they are explicitly assigned to.
Treating these two as magical would make sense:  a conforming implementation
ought to be able to set and alter them until somebody goes and makes
an explicit assignment.  Making it necessary for users to know how to
configure functions to handle resizing automatically puts too much of
a burden on them.  I hate it when vi thinks my screen size is different
from what it is.  Dynamic LINES and COLUMNS is better for a human
usable interface perspective.

Regards, Bruce




Messages sorted by: Reverse Date, Date, Thread, Author