2 ms·
Most non-tui programs being run in terminals don't operate that way though, and tui stuff resizes just fine. ps, for example, only outputs text to fill the term
by t-3 4y ago
Most non-tui programs being run in terminals don't operate that way though, and tui stuff resizes just fine. ps, for example, only outputs text to fill the terminal size and truncates the overflow (which is why it's not safe to grep). Not reflowing makes a lot sense when compared to the complication and bugs reflowing would bring.
- BenjiWiebe 4y agoTried with SCO OpenServer (old UNIX) and modern Fedora, with Konsole and XTerm. Neither 'ps' in either terminal truncates output to fit the terminal. What 'ps' on what OS did that? Some Googling indicates that on Solaris, 'ps' would default to 80 characters wide before truncating, apparently ignoring the size of the terminal. However even that apparently did not apply when piping; it would output the full line in that case.
- t-3 4y agoAfter checking, it seems that procps-ng ps doesn't truncate when piped, heirloom ps and plan9 ps never truncate, Net- and OpenBSD ps always truncate.