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

RE: PATCH: 3.0.6-pre-4: COLUMNS/LINES environment handling



>
> Now, somebody who has a copy of the actual POSIX shell spec should tell
> us if the above is reasonable.  Zoltan, are you out there?
>

This is available online: http://www.opengroup.org/onlinepubs/7908799/toc.htm
(Single Unix V2)

 Other Environment Variables
COLUMNS
A decimal integer > 0 used to indicate the user's preferred width in column
positions for the terminal screen or window. (See column position .) If this
variable is unset or null, the implementation determines the number of columns,
appropriate for the terminal or window, in an unspecified manner. When COLUMNS
is set, any terminal-width information implied by TERM will be overridden. Users
and portable applications should not set COLUMNS unless they wish to override
the system selection and produce output unrelated to the terminal
characteristics. The default value for the number of column positions is
unspecified because historical implementations use different methods to
determine values corresponding to the size of the screen in which the utility is
run. This size is typically known to the implementation through the value of
TERM or by more elaborate methods such as extensions to the stty utility, or
knowledge of how the user is dynamically resizing windows on a bit-mapped
display terminal. Users should not need to set this variable in the environment
unless there is a specific reason to override the implementation's default
behaviour, such as to display data in an area arbitrarily smaller than the
terminal or window.

Note, that neither stty nor "General Terminal Inteface" description say any word
about the whole stuff :-)

In any case, I think the proposed order is correct and patch for 3.1.5 is
welcome.

/andrej

> How much of all that needs to go in the manual?  Lots of it should go in
> the FAQ, including remarks about how it is broken in various versions if
> we can figure that out.
>

We definitely have to describe, how COLUMNS/LINES are used/set by shell.

/andrej



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