@tost this is very sensible yes, i generally put doubles because sometimes variables get tossed into another variable’s values at a later time, but if you’re strict with the quoting you know you will only get literals and not variable expansions so you reduce the places where to look into for debugging..
where you should also use $’’
yes, i had to do this $'' when i was defining LESS_TERMCAP for coloring it (export LESS_TERMCAP_mb=$'\e[1;31m'); the other route was to use command substitution with $(printf <escape>) (becuse apparently $'' is not defined by POSIX or so shellcheck says
finally, there’s the cursed route of using $(tput <something>) i’ve seen it in the wild but i know tput is way slower than printf escapes so i was wary of using it