bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15992: 'ls' ignores term capabilities when generating color.


From: Linda Walsh
Subject: bug#15992: 'ls' ignores term capabilities when generating color.
Date: Thu, 28 Nov 2013 12:31:06 -0800
User-agent: Thunderbird

I logged in on a *dumb* terminal
and did an 'ls'.  Rather than a file list, I got:

\x1b[00;32mwpad.dat\x1b[0m*
\x1b[00mwpad_socks.dat\x1b[0m
\x1b[00mwuredir.xml\x1b[0m
\x1b[00mx.c\x1b[0m
\x1b[00mx.c.orig\x1b[0m
\x1b[00;32mx1\x1b[0m*
\x1b[00mxaml\x1b[0m
\x1b[01;35mxmision-web\x1b[0m/
\x1b[01;35mxrdp\x1b[0m/
\x1b[00mxrdp-sesadmin.log\x1b[0m
\x1b[00;32mxtree117.zip\x1b[0m*
\x1b[00;32mxtree2b-20050606.zip\x1b[0m*
\x1b[01;35mxx\x1b[0m/
\x1b[01;35mxxx\x1b[0m/
\x1b[00;32myast2.txt\x1b[0m*
\x1b[40;33;01mzero\x1b[0m
\x1b[01;35mzips\x1b[0m/
\x1b[01;35mztars\x1b[0m/
\x1b[01;35mztest\x1b[0m/
\x1b[00mzyppinst\x1b[0m
------------------

While I do have an alias that says:
alias ls='ls -CF --show-control-chars --color=always'

If the terminal HAS NO color capabilities, I would expect
it not to display anything where color was selected,
as the mapping for switching colors on a dumb terminal
is "".

I tried settings for "TERM":
of "none", "dumb", and "" (empty)

All gave the same strings as would be correct
for a 16-color terminal.

IMO, "ls" shouldn't print out "bogus" strings for color
that are not in the listed "TERM"inal's capabilties.

Wouldn't that be the wisest course of action?  Or is
there a requirement, "poSomewhereIx" to print garbage strings
to terminals that don't have specific capabilities?

;-)









reply via email to

[Prev in Thread] Current Thread [Next in Thread]