News for hackers. Stuff that matters.
Re:How does apt render its fancy progress bar? by froh on Wednesday October 13, 2021 @08:04AM (#28851086)
To make things portable look up termcap(5) and tput(1) to ask the termcap database for the right control sequence for your terminal, and use those.
Re:How does apt render its fancy progress bar? by julienpalard on Wednesday October 13, 2021 @10:18AM (#28852394)
Interestingly apt don't do this, they hardcode sequences as I did.

Maybe they bet those sequences are the same on all terminals since 1970, espacially those marked "DEC Private" and it won't change soon?

I honestly don't know.

Re:How does apt render its fancy progress bar? by froh on Thursday October 14, 2021 @08:03AM (#28863163)
Most terminal emulations follow the ANSI terminal https://en.m.wikipedia.org/wiki/ANSI_escape_code , so these hard coded escape sequences simply happen to work on most virtual terminals, including windows console (running CMD) and windows terminal.