Opened 17 years ago
Closed 17 years ago
#1469 closed bug (fixed)
ls od dir commands produce illegible colors.
Reported by: | bbjimmy | Owned by: | stippi |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Terminal | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
performing ls or dior from a terminal produces colored text depending on file type. This MUST be an option, not the default. Older eyes - myne - cannot read the terminal listing. BeOS R5 did not have this trouble. please fix it so that everyone can read the terminal by default.
Attachments (3)
Change History (13)
by , 17 years ago
comment:1 by , 17 years ago
This is just an alias in bash (ls="ls --color"). All you have to do is add:
unalias ls
to your .profile in your home directory to turn it off. I think most people would prefer it on, which is why it is the default.
follow-up: 3 comment:2 by , 17 years ago
This MUST NOT be default. If it is, then the OS cannot be deployed as a production os in any business in the US. It would not meet the Americans with disabilities act. Simple black on white, or white on black is fine, or, make the ls -color an option from the Terminal application menu.
comment:3 by , 17 years ago
Replying to bbjimmy:
This MUST NOT be default. If it is, then the OS cannot be deployed as a production os in any business in the US. It would not meet the Americans with disabilities act. Simple black on white, or white on black is fine, or, make the ls -color an option from the Terminal application menu.
Every OS which uses bash has colored output by default (IIRC BeOS had colored output by default too) I just checked on Ubuntu and the colors are more readable, though (the text looks less contrasted). Maybe we're doing something wrong ? Note that I compared ubuntu vs haiku on vmware, so vmware could be responsible of the more contrasted text.
follow-up: 6 comment:4 by , 17 years ago
The colors should certainly be changed. My eyes are quite good, but yellow on white is simply not readable. Some of the output uses some weird form of "false bold" too. I just don't think the color output is either well readable nor very tasteful right now. If somebody could point me to the location in our source tree where the output is defined, I will be happy to figure out a more pleasant scheme. :-)
comment:5 by , 17 years ago
BTW, I always configure Terminal to be amber on black. I don't know how well that works when you're reading much text for a long time, but for an occasional CLI session it's very nice. (see screenshot)
comment:6 by , 17 years ago
Replying to stippi:
The colors should certainly be changed. My eyes are quite good, but yellow on white is simply not readable. Some of the output uses some weird form of "false bold" too. I just don't think the color output is either well readable nor very tasteful right now. If somebody could point me to the location in our source tree where the output is defined, I will be happy to figure out a more pleasant scheme. :-)
The default color codes used by ls are built-in (cf. src/bin/coreutils/src/ls.c: color_indicator[]) and can be customized using the LS_COLORS environment variable. Given a configuration file, the dircolors tool prints the LS_COLORS string that this configuration translates to. It can also print the default configuration, so you have a start config file to play with. The ANSI VT/100 color codes can e.g. be found here:
http://www.termsys.demon.co.uk/vtansi.htm#colors
I'll also attach mmu_man's little script that prints out a nice table (I've allowed myself to rename it from ANSIHLP to color_codes, though).
I have only seen the color codes being mapped to color names so far, not to exact RGB color values. So maybe there's room to optimize them. That would have to be done in src/apps/terminal/TermView.cpp: kTermColorTable[]. How the color codes are translated to indices into this table can be seen in TermParse.cpp -- best search for FORECOLOR.
by , 17 years ago
Attachment: | color_codes added |
---|
mmu_man's script to print a table showing the effect of the color codes
follow-up: 8 comment:7 by , 17 years ago
If we must have color, the Amber on black looks quite readable.
comment:8 by , 17 years ago
Replying to bbjimmy:
If we must have color, the Amber on black looks quite readable.
The amber itself is not nearly as well as readable as black on white. Besides, it's not for no reason, that virtually all of today's editors and terminals have black on white (or at least a bright color) as default.
comment:9 by , 17 years ago
Owner: | changed from | to
---|
comment:10 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Was fixed by Axel in hrev23437
ls command output in BeOS hrev5.03