On 23/10/2026 05:35, Collin Funk wrote:
Looking at various distributions shell files in /etc and GitHub code
search, I couldn't actually find anyone doing this.

I find it mildly interesting that some distributions use ~/.dircolors
and others use ~/.dir_colors, though.

-- 8< --

* doc/coreutils.texi (dircolors invocation): Use an absolute path when
checking whether a user's .dircolors file exists in $HOME and when
loading it. Don't define a variable.

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-HB2T3LWR.
---
  doc/coreutils.texi | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index a916b9cf3..cb1f9ee6c 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -8621,8 +8621,7 @@ @node dircolors invocation
  adapt them to your favorite shell):
@example
-d=.dircolors
-test -r $d && eval "$(dircolors $d)"
+test -r ~/.dircolors && eval "$(dircolors ~/.dircolors)"
  @end example
@vindex LS_COLORS

Both patches look good to me.

cheers,
Padraig

Reply via email to