Bug 186862

Summary: add support for color ls for xterm-256color
Product: [Fedora] Fedora Reporter: dann
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: meyering
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-17 11:11:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 235704    

Description dann 2006-03-27 04:27:29 UTC
If TERM is set to xterm-256color, color ls does not work by default

Can you please add the line:

TERM xterm-256color

to /etc/DIR_COLORS (and/or /etc/DIR_COLORS.xterm) to make this work? 

It might even be nice to add separate support for xterm-256colors in order to
take advantage of the higher number of colors. 
The format would be like
for the color foreground:
38;5;CNUMBER
and for the background:
48;5;CNUMBER

where 0<=CNUMBER<=255

xterm in FC5 is compiled with 256 colors support by default, gnome-terminal will
soon get support for 256 colors, so more and more users could use this...

Comment 1 dann 2007-09-24 20:18:57 UTC
If someone that has some clue about colors can decide which of the 256 colors to
use for each file type, I can do the rest.

It would be nice if the colors chosen are readable on both a white and a black
background. 

One easy way to see the available colors is to run:
env TERM=xterm-256color emacs -nw -f list-colors-display


Comment 2 Ondrej Vasik 2008-01-17 11:11:33 UTC
Sorry for that forgotten bugzilla. Closing NEXTRELEASE. There is similar
bugzilla ticket against RAWHIDE (#239266) , got fixed in RAWHIDE
(coreutils-6.9-17.fc9) and will be fixed later in F8/F7. 

Comment 3 dann 2008-01-17 13:44:40 UTC
(In reply to comment #2)
> Sorry for that forgotten bugzilla. Closing NEXTRELEASE. There is similar
> bugzilla ticket against RAWHIDE (#239266) , got fixed in RAWHIDE
> (coreutils-6.9-17.fc9) and will be fixed later in F8/F7. 

Looking at coreutils-6.9-17.fc9, this BZ is NOT fixed. This is not only about
adding a line in /etc/DIR-COLORS so that colors work on a 256 color terminals,
but more about actually making use of the 256 colors to improve the display.
So please reopen this bug. Thanks.

Comment 4 Ondrej Vasik 2008-01-17 14:18:27 UTC
According to bugzilla title and description this bugzilla actually IS FIXED in
coreutils-6.9-17.fc9. You wrote "it might even be nice" about that enhanced
color support - I agree with you and I will try to do something like that for
F9. Anyway - that bugzilla is against FC-5 which is EOL(and was EOL when I got
maintainance of coreutils in OCT 2007) and there will be no updates for it.
Because of that NEXTRELEASE is correct closing state for me.

So support for colored ls for xterm-256color was imho added, this bugzilla is
marked as F8target(actually missed), I(or you) could create new bugzilla against
Rawhide with Keywords FutureFeature - but I think this FC-5 ticket should stay
closed.

Comment 5 dann 2008-01-17 14:37:08 UTC
(In reply to comment #4)
> So support for colored ls for xterm-256color was imho added, this bugzilla is
> marked as F8target(actually missed), I(or you) could create new bugzilla against
> Rawhide with Keywords FutureFeature - but I think this FC-5 ticket should stay
> closed.

OK, I didn't know what the correct protocol is. I opened another BZ: 429121
with this topic. Thanks