devel branch commit 1cbe8c04bb
The man page says:
COLUMNS
Used by the select compound command to determine the terminal
width when printing selection lists. Automatically set if the
checkwinsize option is enabled or in an interactive shell upon receipt
of a SIGWINCH.
LINES Used by the select compound command to determine the column
length for printing selection lists. Automatically set if the
checkwinsize option is enabled or in an interactive shell upon receipt
of a SIGWINCH.
and
shopt [...]
checkwinsize
If set, bash checks the window size after each external
(non-builtin) command and, if necessary, updates the values of LINES
and COLUMNS, using the file descriptor associated with the standard
error if it is
a terminal. This option is enabled by default.
Why do this? Why not just set the values of LINES and COLUMNS when the
script begins to run, or whenever checkwinsize is enabled, if it had
been disabled? And then upon SIGWINCH also in a noninteractive shell?
Zack