The previous logic (check ioctl result, prefer env when 80x24) added complexity and crashes. Simple or with env vars after ioctl is safe: ioctl returns 80x24 on stdout fd mismatch, env vars (COLUMNS/LINES from shell) provide the correct initial size.
13 KiB
13 KiB