[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19922: mention "LS_COLORS="
From: |
Pádraig Brady |
Subject: |
bug#19922: mention "LS_COLORS=" |
Date: |
Sun, 22 Feb 2015 13:34:21 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
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