GNU bug report logs - #19922
mention "LS_COLORS="

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sun, 22 Feb 2015 12:10:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19922 in the body.
You can then email your comments to 19922 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#19922; Package coreutils. (Sun, 22 Feb 2015 12:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sun, 22 Feb 2015 12:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-coreutils <at> gnu.org
Subject: mention "LS_COLORS="
Date: Sun, 22 Feb 2015 19:57:18 +0800
ls man page says:

       Using color to distinguish file types is disabled both by  default  and
       with  --color=never.  With --color=auto, ls emits color codes only when
       standard output is connected to a terminal.  The LS_COLORS  environment
       variable can change the settings.  Use the dircolors command to set it.

Add:
Or use LS_COLORS=; export LS_COLORS
to override any ls="ls --color" aliases others might have set up for us,
and thus make sure colors are off.




Information forwarded to bug-coreutils <at> gnu.org:
bug#19922; Package coreutils. (Sun, 22 Feb 2015 13:35:01 GMT) Full text and rfc822 format available.

Message #8 received at 19922 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>, 
 19922 <at> debbugs.gnu.org
Subject: Re: bug#19922: mention "LS_COLORS="
Date: Sun, 22 Feb 2015 13:34:21 +0000
tag 19922 notabug
close 19922
stop

On 22/02/15 11:57, 積丹尼 Dan Jacobson wrote:
> ls man page says:
> 
>        Using color to distinguish file types is disabled both by  default  and
>        with  --color=never.  With --color=auto, ls emits color codes only when
>        standard output is connected to a terminal.  The LS_COLORS  environment
>        variable can change the settings.  Use the dircolors command to set it.
> 
> Add:
> Or use LS_COLORS=; export LS_COLORS
> to override any ls="ls --color" aliases others might have set up for us,
> and thus make sure colors are off.

LS_COLORS only selects colors, it doesn't enable/disable.
If unset a color set internal to ls is used.
Aliases are not used in shell scripts.
For interactive shell you can avoid with leading \ or with env:

  \ls -l
  env ls -l

cheers,
Pádraig.

p.s. since v8.23, environment variables can be used to disable ls colors,
but that's a big hammer since it's for ls to honor terminal capabilities.
To disable colors for ls (but also have other side effects):

  LS_COLORS= TERM= COLORTERM= ls -l





Information forwarded to bug-coreutils <at> gnu.org:
bug#19922; Package coreutils. (Sun, 22 Feb 2015 14:05:02 GMT) Full text and rfc822 format available.

Message #11 received at 19922 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 19922 <at> debbugs.gnu.org
Subject: Re: bug#19922: mention "LS_COLORS="
Date: Sun, 22 Feb 2015 22:04:37 +0800
PB> p.s. since v8.23, environment variables can be used to disable ls colors,
PB> but that's a big hammer since it's for ls to honor terminal capabilities.
PB> To disable colors for ls (but also have other side effects):

PB>   LS_COLORS= TERM= COLORTERM= ls -l

Yes be sure that is documented.

For me,
export LS_COLORS=
saved the day when busybox forced colors down ones throat.




Added tag(s) notabug. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 23 Oct 2018 01:48:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 19922 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 23 Oct 2018 01:48:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 20 Nov 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.