While reading about Poettering's adventures in determining the best $TERM value for serial & VM terminals in systemd, I accidentally discovered that ls from coreutils doesn't consult terminfo to check whether a terminal emulator (TE) supports colour. What does it consult then? $TERM? Yes and no. At first glance, with --color=auto flag, it ignores $TERM completely, trusting the LS_COLORS environment variable. But if $LS_COLORS is absent, it still prints in colour for some terminals--yet, simul...