In my Debian .bashrc file I have this:

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt

"if the terminal has the capability"...

In my Manjaro .bashrc I see this:

# Set colorful PS1 only on colorful terminals.

Which terminals need these checks?

  • 2
    All old terminals? Do you want a list of terminals that don't support color codes? That would require specific version numbers for some of them. Remember that some terminal emulators have been around for decades. You also have all sorts of embedded devices, some of which might still show output on monochrome displays. Could you narrow this down a little? – terdon Dec 18 '19 at 11:23
  • The question is erroneously conflating terminal emulators with terminals, moreover. – JdeBP Dec 18 '19 at 11:47
  • Why restrict to emulators? The DEC VT340 was a very nice mono-chrome terminal. See also VT100 series, VT200 series, VT300 series, and VT420. There are others. For emulators see the original xterm (I think it did not have colour). – ctrl-alt-delor Dec 18 '19 at 12:01

Quite a few physical terminals do not support colours, so they need these checks.

Likewise, some older terminal emulators, such as pre-XFree86 xterm, do not support colours. There are probably current terminal emulators on “smaller” systems (embedded or retro) which don’t support colours either.

Some terminals can have their colour support toggled; for example Minicom, which even starts with colour support disabled by default.

| improve this answer | |

A lot of terminals still don't support colour, especially when it comes to older terminals or embedded devices. Additional to the link given in the previous answer, one list of terminals with their (lack of) true colour support listed is found in this gist. That includes a few still popular solutions like mutt or some terminals on Android etc.

| improve this answer | |
  • That list is about “true colour” support; Mutt, tig etc. support colour, but not true colour (and are not terminals). – Stephen Kitt Dec 18 '19 at 12:37
  • Aye, that's right. I changed the answer to reflect that - which makes it a bit on a tangent to the actual question – planetmaker Dec 18 '19 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.