[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH 1/6] android: some sensible defconfig changes
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2012-06-10 12:46:24
Message-ID: 201206101446.24229.vda.linux () googlemail ! com
[Download RAW message or body]
On Tuesday 29 May 2012 01:35, Rich Felker wrote:
> On Tue, May 29, 2012 at 01:25:40AM +0200, ralda@gmx.de wrote:
> > > - ls --color (default)
> > > +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
> >
> > This is a bad idea. LS_COLOR_IS_DEFAULT breaks the usage of ls in many
> > shell scripts ... or at least did this in older versions (don't know if
> > newer versions have any workaround for this).
>
> The proper use of color-ls-by-default is with a shell alias; IMO this
> option should be removed from busybox since it's so broken.
Why is it broken?
if (ENABLE_FEATURE_LS_COLOR_IS_DEFAULT && isatty(STDOUT_FILENO)) {
char *p = getenv("LS_COLORS");
/* LS_COLORS is unset, or (not empty && not "none") ? */
if (!p || (p[0] && strcmp(p, "none") != 0))
G_show_color = 1;
}
As you see, color will be auto-enabled only for tty output.
> And yes,
> the breakage is still there, or at least explicit --color affects
> output even if it's not a terminal.
Is this wrong?
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic