4 ms·
I just wish Unix command-line tools would refrain from including terminal escape sequences in their output when invoked with TERM=dumb. Homebrew, wget and youtu
by hollerith 11y ago
I just wish Unix command-line tools would refrain from including terminal escape sequences in their output when invoked with TERM=dumb. Homebrew, wget and youtube-dl, I'm looking at you.
Although some of these tools can be persuaded to stop including escape sequences with the right switch, the right switch varies with the tool, and learning the right switch to use with a particular tool requires reading a large fraction of a very long man page. In contrast, 20 years ago, IIRC all command-line tools I used respected TERM=dumb.
Since isatty() was mentioned, let me point out that directing the output of the tools named above to a named pipe instead of a pseudo-TTY is not enough to get them to stop sending terminal escape sequences.