On Fri, Apr 3, 2026 at 3:12 AM Koichi Murase <[email protected]> wrote:
>
> 2026年4月3日(金) 15:13 Martin D Kealey <[email protected]>:
> > On Fri, 3 Apr 2026, 16:22 Zachary Santer, <[email protected]> wrote:
> > > [...] Why not just set the values of LINES and COLUMNS when the
> > > script begins to run,
>
> That breaks the idiom of COLUMNS to restrict the widths of the output.
> Some programs use COLUMNS to automatically wrap lines in their output,
> and users conventionally call such programs as « COLUMNS=80
> ./script.sh » to adjust the widths of the output.

> > > And then upon SIGWINCH also in a noninteractive shell?
>
> This also breaks « COLUMNS=80 ./script.sh ».

COLUMNS would still be reset the first time an external command is
run, unless checkwinsize is disabled first. Bash could be made to set
COLUMNS and LINES only if they weren't present in the environment when
the script started, even if checkwinsize is enabled.

Reply via email to