doc: dircolors: don't assume the shell starts in $HOME

* 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.
This commit is contained in:
Collin Funk committed 2026-10-23 19:31:48 -07:00
1 parent 479317e6ce
commit aad192543e
1 file changed
+1 -2
+1 -2
View File
@@ -8621,8 +8621,7 @@ exists, you can put the following lines in your @file{~/.bashrc} (or
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