Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 2000 17:46:34 -0700 (PDT)
From:      Doug Barton <Doug@gorean.org>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        Tim Vanderhoek <vanderh@ecf.utoronto.ca>, freebsd-bugs@FreeBSD.org
Subject:   Re: bin/18900: patch to add colorizing feature to /bin/ls 
Message-ID:  <Pine.BSF.4.21.0005301727010.22524-100000@dt051n0b.san.rr.com>
In-Reply-To: <200005310001.BAA28109@hak.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 31 May 2000, Brian Somers wrote:

Tim asked:
> > How would you code the existing -F option using a filter?
> 
> cat >/bin/myls <<eof
> #! /bin/sh
> exec ls -F "$@" | colourise
> eof

	I don't think that's what Tim was asking. Let's say you have an ls
command without the -F option. How do you write a filter that implements
the -F option without essentially doing exactly what 'ls' just did all
over again? 

	I disagree with your premise that there should be a
"colorize" program as a seperate entity. To return to your previous
argument, we already have a pager (or two, or three) so duplicating pager
functionality in 'ls' makes no sense at all. However, we do not have a
"colorize" utility currently, and there is no way to write one without
essentially duplicating a significant chunk of the functionality of
'ls'. There are a lot of features in 'ls' already that could be done with
other programs, or other combinations of programs. If you're going to
advocate stripping 'ls' down to the bare minimum functionality, you've got
a long row to hoe. :)

	On the other hand, you could make the argument that if someone had
held firm to the anti-bloatist line N number of years ago, useless frills
like -C, -F, -c, -t, -R, etc. would never have sullied the good name of ls
to begin with.

	I don't see anyone asking for 'ls' to wash their breakfast dishes
for them. The facts remain:

1. People _do_ want this. It gets asked often on -questions.
2. The code is already written. 
3. It adds almost no bloat.
4. It's totally, completely optional. 

	The only possible change I'd consider is making the colors the
same as gnuls' defaults. That'd flatten out the learning curve for people
coming over from linux, and those who like the traditional colors could
use the environment variable to set them. 

	So, other than on "purist" grounds, are there any other
objections?

Doug
-- 
        "Live free or die"
		- State motto of my ancestral homeland, New Hampshire

	Do YOU Yahoo!?




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0005301727010.22524-100000>