Discussion:
ls output with color?
Maurizio Caloro
2012-05-10 07:03:25 UTC
Permalink
Hello
it's possible to become ls output in colored version, i need for this Bash?
exist for this any code-examples?
regards
Mauri
--
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
Ian D. Leroux
2012-05-10 08:10:35 UTC
Permalink
Hello it's possible to become ls output in colored version, i need for
this Bash? exist for this any code-examples?
NetBSD's ls(1) does not support colorized output. If you want this
feature, you can install misc/colorls from pkgsrc to get FreeBSD's
ls(1), or you can use the GNU version of ls(1) provided by
sysutils/coreutils.

-- IDL
Julio Merino
2012-05-10 16:13:35 UTC
Permalink
Hello it's possible to become ls output in colored version, i need for
this Bash? exist for this any code-examples?
NetBSD's ls(1) does not support colorized output.  If you want this
feature, you can install misc/colorls from pkgsrc to get FreeBSD's
ls(1), or you can use the GNU version of ls(1) provided by
sysutils/coreutils.
Or just misc/gnuls for the latter.
--
Julio Merino / @jmmv
herbert langhans
2012-05-10 06:06:30 UTC
Permalink
There is the package /colorls what can do the trick. You have to set an
alias in your shell, then it will replace the 'real' ls.

Cheers
herbs
Post by Maurizio Caloro
Hello
it's possible to become ls output in colored version, i need for this Bash?
exist for this any code-examples?
regards
Mauri
--
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
--
sprachtraining langhans
herbert langhans, warschau
herbert.raimund[at]gmx.net
herbert[at]langhans.com.pl
http://www.langhans.com.pl
+0048 603 341 441

| jabber:herbs
| icq:414500866
| yahoo_im:herbert.raimund
Aleksey Cheusov
2012-05-12 15:29:24 UTC
Permalink
Hello it's possible to become ls output in colored version, i need for
this Bash? exist for this any code-examples?
I've just added my own tool "colorit" to pkgsrc (textproc/colorit).
I've been using it for more than 8 years for colorizing output of ls, make,
diff, cvs diff and many other utilities.

Two screenshots:
Loading Image...
Loading Image...

See MESSAGES about how to configure it. Examples ready for use are included.

Run the following to build the package:
cd /usr/pkgsrc
cvs up textproc/dict-server textproc/colorit
cd textproc/colorit
make install
--
Best regards, Aleksey Cheusov.
Ron Swiernik
2012-05-13 19:42:26 UTC
Permalink
Not to start a flame war, but I really don't like the color ls that linux
does. Just putting in a users vote way before someone says that it should
become the default...

ls -F works very well for me...hate blinky items in something I am trying
to read
Post by Aleksey Cheusov
Hello it's possible to become ls output in colored version, i need for
this Bash? exist for this any code-examples?
I've just added my own tool "colorit" to pkgsrc (textproc/colorit).
I've been using it for more than 8 years for colorizing output of ls, make,
diff, cvs diff and many other utilities.
http://mova.org/~cheusov/pub/screenshots/colorit-1.png
http://mova.org/~cheusov/pub/screenshots/colorit-2.png
See MESSAGES about how to configure it. Examples ready for use are included.
cd /usr/pkgsrc
cvs up textproc/dict-server textproc/colorit
cd textproc/colorit
make install
--
Best regards, Aleksey Cheusov.
--
Facts left unrecorded often cease to be facts.
- IBM Accounting Course, 1949
Andy Kosela
2012-05-13 21:28:04 UTC
Permalink
Post by Ron Swiernik
Not to start a flame war, but I really don't like the color ls that linux
does. Just putting in a users vote way before someone says that it should
become the default...
ls -F works very well for me...hate blinky items in something I am trying
to read
Definetly +1 to that. The first thing i do on my RHEL's is to disable
colors. Plus when you still deal a lot with monochrome displays, the
colors won't help you anyway. I just love *BSD's are keeping it
simple with very sane defaults.

--Andy
Michael Jensen
2012-05-13 21:48:53 UTC
Permalink
Date: Sun, 13 May 2012 23:28:04 +0200
Subject: Re: ls output with color?
Post by Ron Swiernik
Not to start a flame war, but I really don't like the color ls that linux
does. Just putting in a users vote way before someone says that it should
become the default...
ls -F works very well for me...hate blinky items in something I am trying
to read
Definetly +1 to that. The first thing i do on my RHEL's is to disable
colors. Plus when you still deal a lot with monochrome displays, the
colors won't help you anyway. I just love *BSD's are keeping it
simple with very sane defaults.
--Andy
Another +1 to that. I hate ANSI colours in any standard command. Keep it
simple.

--

[]-[]-[] SDF Public Access UNIX System
| []-[]-[] http://sdf.org
|rednight@};-
Scrap Happy
2012-05-13 21:54:33 UTC
Permalink
Post by Michael Jensen
Post by Ron Swiernik
Not to start a flame war, but I really don't like the color ls that linux
does. Just putting in a users vote way before someone says that it should
become the default...
ls -F works very well for me...hate blinky items in something I am trying
to read
Definetly +1 to that. The first thing i do on my RHEL's is to disable
colors. Plus when you still deal a lot with monochrome displays, the
colors won't help you anyway. I just love *BSD's are keeping it
simple with very sane defaults.
Another +1 to that. I hate ANSI colours in any standard command. Keep it
simple.
I'll qualify that with my use of colors to identify individual
"virtual consoles". Makes it easier to remember things like
"I was editing the disklabel in the RED console..."
Aleksey Cheusov
2012-05-13 21:56:51 UTC
Permalink
Post by Michael Jensen
Another +1 to that. I hate ANSI colours in any standard command. Keep it
simple.
There are people who prefer monochrome output of commands.
Personally, I prefer coloful prompt and output of make, configure, ls and so on
because colors helps me to do my job better. And there are people like me.

Colors implemented *inside* of ls, make and others like GNU does
is really stupid idea and nobody is tries to do this in NetBSD.
So, what's the problem?
herbert langhans
2012-05-13 22:25:47 UTC
Permalink
I bet nobody would ever dare to colorize the (almost) last really
pure Unix. It anyway won't work with all the different systems NetBSD
runs on.

Though - I use colorls now on my server. Just to see the directories
better, it looks good in white and green.

But colors by default should rather be left to the penguins, I agree!

Cheers
herb langhans
Post by Aleksey Cheusov
Post by Michael Jensen
Another +1 to that. I hate ANSI colours in any standard command. Keep it
simple.
There are people who prefer monochrome output of commands.
Personally, I prefer coloful prompt and output of make, configure, ls and so on
because colors helps me to do my job better. And there are people like me.
Colors implemented *inside* of ls, make and others like GNU does
is really stupid idea and nobody is tries to do this in NetBSD.
So, what's the problem?
--
sprachtraining langhans
herbert langhans, warschau
herbert.raimund[at]gmx.net
herbert[at]langhans.com.pl
http://www.langhans.com.pl
+0048 603 341 441

| jabber:herbs
| icq:414500866
| yahoo_im:herbert.raimund
S.P.Zeidler
2012-05-15 04:35:07 UTC
Permalink
Post by Aleksey Cheusov
Post by Michael Jensen
Another +1 to that. I hate ANSI colours in any standard command. Keep it
simple.
There are people who prefer monochrome output of commands.
Personally, I prefer coloful prompt and output of make, configure, ls and so on
because colors helps me to do my job better. And there are people like me.
Colors implemented *inside* of ls, make and others like GNU does
is really stupid idea and nobody is tries to do this in NetBSD.
So, what's the problem?
There's no problem if it -can- do color. There's only a problem if it
assumes the user terminal has a specific background color and the user
a specific acuity of vision and just does color by default. Cyan on pale
yellow, gah.

There is reasonable hope that the user-picked default text color will
be readable on the given background (even if most admins will have had
to 'rescue' a user who managed to set white-on-white), so monochrome is
a better starting point. The good thing about Unices is thst "reasonable
default" isn't all you can get.

regards,
spz
--
***@serpens.de (S.P.Zeidler)
David Young
2012-05-15 19:56:21 UTC
Permalink
Post by S.P.Zeidler
Post by Aleksey Cheusov
Post by Michael Jensen
Another +1 to that. I hate ANSI colours in any standard command. Keep it
simple.
There are people who prefer monochrome output of commands.
Personally, I prefer coloful prompt and output of make, configure, ls and so on
because colors helps me to do my job better. And there are people like me.
Colors implemented *inside* of ls, make and others like GNU does
is really stupid idea and nobody is tries to do this in NetBSD.
So, what's the problem?
There's no problem if it -can- do color. There's only a problem if it
assumes the user terminal has a specific background color and the user
a specific acuity of vision and just does color by default. Cyan on pale
yellow, gah.
It seems to me that the problem at bottom is that the colors are chosen
in the wrong place. Just for example, recently I used some Linux box
that comes with a color grep as well as a color ls. Color grep uses a
color to highlight strings matching your regular expression. Both are
useful until and unless I use a pager:

grep -i install README -> color!
grep -i install README | less -> no color

grep is of course switching color on/off based on isatty(STDOUT_FILENO)
and other factors, and less isnotatty. :-) [1]

There should be a "late binding" of colors[2] to semantic items directly
before display. The semantic items can be indicated using markup, e.g.,

% grep -i install README
To <grep:match>install</grep:match> Qubert, run ./configure ; make ; make install

The colors can be given with a stylesheet that's associated NOT with the
program but with the display, e.g.,

@namespace grep url(http://example.org/unix-grep);
grep|match { color: green; }

Since the stylesheet is associated with the display, I think that it's
easier to make it self-consistent: no white on white text!

Dave

[1] I think that fewer programs than use isatty(3) today should use it
in the future. Maybe we should leave it up to the shell both to
query the output device with isatty(3) and to adapt program outputs
to program inputs in a pipeline.

[2] Colors or other styles. Regular-expression matches could be bold,
tall, italic, all-caps, or whatever style makes them stand out.
--
David Young
***@pobox.com Urbana, IL (217) 721-9981
Loading...