GNU bug report logs -
#19922
mention "LS_COLORS="
Previous Next
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.
Full log
Message #8 received at 19922 <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 6 years and 269 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.