Re:How does apt render its fancy progress bar?
by not2b on Wednesday October 13, 2021 @12:07PM
(#28853999)
Back when termcap and later terminfo were developed, most terminals didn't support ANSI escape sequences, at all, and used completely different control codes. But that was 30+ years ago. It was for actual dumb terminals that could only display text. These days, it's a safe bet that any terminal emulator will support the ANSI escape sequences.
[ Parent
| on HN ]
Re:How does apt render its fancy progress bar?
by spudlyo on Wednesday October 13, 2021 @02:46PM
(#28855833)
Is it though? What if I have my TERM set to 'dumb' because I'm running your CLI command inside a very limited console embedded inside a text editor or other tool? At the very least you should `test -t` in your script to ensure STDOUT isn't being redirected to a file so you don't fill it with garbage escape sequences.