Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Jun 2000 15:08:26 -0700
From:      "Jordan K. Hubbard" <jkh@zippy.cdrom.com>
To:        Mike Smith <msmith@FreeBSD.org>
Cc:        "Andrey A. Chernov" <ache@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/bin/ls extern.h ls.1 ls.c ls.h print.c 
Message-ID:  <21730.960070106@localhost>
In-Reply-To: Your message of "Sat, 03 Jun 2000 10:50:22 PDT." <200006031750.KAA09604@mass.cdrom.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > I agree. If anybody wants colors he MUST use termcap database or curses and
 
> > NOT some hardcoded values. This extension should be backed out not because 
it 
> > is a feature but because of bad implementation of this feature.
> 
> Agreed.  This was a very poor decision.

I have to also agree that if we're really going to add color to our ls
then we should Do It Right since we're FreeBSD.  I've already
repressed the automatic shudder I feel whenever the words "color ls"
are mentioned and am willing to even side with the camp who supports
it so that the linux people will stop WHINING about how dull and drab
and featureless our ls(1) is, but we can't do it by hard-coding ANSI
escape sequences into the code.  That's just vile and Josef Karthauser
really needs to back this out or I can guarantee that somebody is
going to do it for him and that's not a good way of doing business; a
man should always shoot his own dog.

Doing it right entails calling tgetstr() to fetch the appropriate
color-setting attributes (AF and AB, if I'm not mistaken) and using
them if -G is specified.  The anti-bloatist camp will, of course,
scream at the idea of /bin/ls bloating up even more so let's just
clarify the size issues right here and now:

Without termcap:

-r-xr-xr-x  1 root  wheel  189248 May 30 22:47 /bin/ls

With:

-r-xr-xr-x  1 root  wheel  281816 Jun  3 15:03 /bin/ls

That's 100K difference and certainly a significant increase, though
one could also perhaps argue that at 189K, ls(1) is no longer the
thin, svelte utility we remember from her youth and another chocolate
eclair or two isn't going to make that big a difference at this point.

- Jordan


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




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