On Wed, Jun 23, 2021 at 12:27:17AM +0800, Bret Busby wrote: > And, that also applies, if provision for coloured text is commented out, in > the .bashrc file.
There's nothing in .bashrc which controls the terminal's interpretation of color escape sequences. Or in bash, anywhere. It's entirely between the terminal, and the application which generates the color sequences. The shell is not involved. The closest the shell comes to being involved is if you try to trick the application into thinking it's on a different kind of terminal, by changing the TERM variable. This rarely works out well, except in very specific circumstances -- the most notable being "I'm ssh-ing to a system that doesn't know about my terminal type". As I've already tested today, it sure as hell doesn't work for apt(8).