News for hackers. Stuff that matters.
Re:How does apt render its fancy progress bar? by tomc1985 on Wednesday October 13, 2021 @12:26PM (#28854217)
Store the sequences in variables and put those instead. You get readability and locality!
Re:How does apt render its fancy progress bar? by nick__m on Wednesday October 13, 2021 @12:51PM (#28854519)
I was about to post the exact same reply so I will post it as an example:

  #!/bin/sh
  BLUE=$(tput setaf 4)
  RST=$(tput sgr0)
  echo "I'm ${BLUE}blue${RST}."