On Mon, Oct 11, 2021 at 03:33:12PM +0200, Jakub Wilk wrote:
> Package: colorized-logs
> Version: 2.6-1
>
> Some programs are very confused about the terminal width when run under
> pipetty, e.g.:
[...]
> Apparently this is because pipetty never sets windows size, so the size is
> reported as 0:
>
> $ strace -f -o '|grep -w TIOCGWINSZ >&2' pipetty gallery-dl --help
> >/dev/null
> 9222 ioctl(1, TIOCGWINSZ, {ws_row=0, ws_col=0, ws_xpixel=0, ws_ypixel=0})
> = 0
> 9222 ioctl(1, TIOCGWINSZ, {ws_row=0, ws_col=0, ws_xpixel=0, ws_ypixel=0})
> = 0
Yeah, that's because in the usual use case there is no outside terminal.
Passing the size of the terminal if there's one would be probably be a bad
idea as it'd change the behaviour during testing vs real use.
One option would be providing a bogus size (such as 80x24 as getty on
serial does). I'm not sure, though, if it'd do more or less harm than
not providing a size at all.
On the other hand, lesstty in any non-erroneous case will be invoked from
a terminal -- I've thus just changed it to pass the size.
What would be your advice about what data to provide for pipetty?
Meow!
--
⢀⣴⠾⠻⢶⣦⠀ Pesymista widzi ciemny tunel.
⣾⠁⢠⠒⠀⣿⡁ Optymista widzi światełko w tunelu.
⢿⡄⠘⠷⠚⠋⠀ Realista widzi że jedzie pociąg.
⠈⠳⣄⠀⠀⠀⠀ Maszynista widzi trzech idiotów na torach.